Questions tagged [background-thread]

A background thread is a thread that not directly driving the application but does some processing asynchronously.

Many UI toolkits require the use of background threads for anything that takes longer than a couple of milliseconds in order to keep the UI responsive.

Background threads are referred to as daemon threads at times.

Often background threads take care of recurring tasks, like cleaning up caches or similar.

Since the term 'background thread' is not very specific you might want to consider more specific tags related to the actual technology you are using.

If your question is independent of the actual technology this tag is a good fit.

Background Thread in .Net
Background thread in java

224 questions
2
votes
2 answers

Why does my app freeze while I upload data to firebase?

UPDATE: ****little edit, i found out that actually the only thing that's freezing is retrieving the data from firebase, especially the images that needed to retrieve. the func initOberserver is for retrieving the data from firebase. so this needs to…
2
votes
1 answer

Realm Swift background search

I have a realm database in my app, containing a list of ~2000 users. A tableview displays these users, and a search bar allows to filter them (on 6 different properties of each user). This operation was blocking the UI, so I put it in a background…
Arnaud
  • 955
  • 1
  • 6
  • 15
2
votes
3 answers

iOS background download

I have an application that requires downloading large amount of data when the user logs in. I wanted to move the download portion of it to a background thread so the user can navigate the app without having to wait for the download to complete. I…
dogwasstar
  • 852
  • 3
  • 16
  • 31
2
votes
1 answer

Updating UI Dispatch_Async background download Swift

Im working on a folders/files application where users are able to download files to local disk. Whenever a user is downloading a file, I want to show a download bar that displays progress. to do so, I've created a protocol that allows my download…
SKYnine
  • 2,708
  • 7
  • 31
  • 41
2
votes
1 answer

Good way to run recurring background task in WCF?

I have a WCF solution that runs under IIS. Some of the data I need to give back to clients comes from a third party website that we will need to poll frequently to get any new data. Would it be a bad practice to create a Timer in the…
BVernon
  • 3,205
  • 5
  • 28
  • 64
2
votes
2 answers

Xamarin.Forms Background Thread

I'm trying to get a really simple application running listing google Task. I have a SQLite local db I'd like to sync / try syncing at regular interval with Google's server. I was thinking of simply running a simple background thread so it'd work…
2
votes
2 answers

How To Test In XCode That A Process Is Running On A Background Thread?

I'm upgrading from AFNetworking 1.0 to AFNetworking 2.0. With AFNetworking 1.0 I could never get it to sync on a background thread so it was stalling my UI when it did sync. I want to run all AFNetworking 2.0 syncs on a background thread and update…
2
votes
1 answer

How to create GCD block with conditional Timer for background thread in iOS?

Following is my Method for uploading video on background thread reading from plist file . Now what i need is once they read all the entry from plist and done execution of first block i want to check in completion block that is there any new entry…
BhavikKama
  • 8,566
  • 12
  • 94
  • 164
2
votes
1 answer

Fatal signal 11 in background thread only on 4.4.2

I have an activity that displays a screenshot of a map fragment, along with some other things. Everything shows up perfectly until a second or two later when the app crashes. This is only happening on Android phones using 4.4.2 kitkat, but not on…
CodyMace
  • 646
  • 1
  • 8
  • 19
2
votes
1 answer

custom adapter getView only gets called while debugging

I have an activity whose only purpose is to display a list view. There is a custom adapter to serve up the views for each element in the array. I have break points all over and when I debug, it stops in "count" a number of times - the first few…
ssdscott
  • 683
  • 6
  • 12
2
votes
0 answers

Setting breakpoints in 2 different threads in android

I want to set breakpoints in UI thread and Background thread. I put a breakpoint at the start of run() method in Background Thread and another break point at variable in UI thread, I want to examine. I set break point property to suspend all. Once I…
2
votes
1 answer

Thread problems in WPF

You cannot bind to a WPF DataGrid's Columns property, so a workaround is to use use an attached property as found in this SO question/answer. My viewmodel exposes an ObservableCollection containing the DataGridColumns, and I bind it to the DataGrid…
2
votes
2 answers

Trying to Import background_thread from google.appengine.api (like in example) fails with ImportError

Simply doing... from google.appengine.api import background_thread ...like in the official documentation, fails for me with... : cannot import name background_thread ...when calling it from my backend. How do I get…
pepto
  • 41
  • 2
2
votes
1 answer

Where are the logs from BackgroundThreads on App Engine?

I'm writing an app that writes log entries from a BackgroundThread object on a backend instance. My problem is that I don't know how to access the logs. The docs say, "A background thread's os.environ and logging entries are independent of those of…
david193
  • 155
  • 1
  • 10
1
vote
3 answers

Loading tableview images from URL in background causes duplicates

I have a tableview that is populated with the results of a search term. Many of the results have images that need to load from URLs, but not all. I originally had it grabbing the image from the URL in the cellForRowAtIndexPath method in the main…
Ryan
  • 570
  • 9
  • 25