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
0
votes
1 answer

WCF NetTCP with Background Threading

Background: I have a system that hosts WCF services inside a Windows Service with NetTCP binding. To add a new service to the collection you simply add the standard WCF config entries inside services /> and then add a line…
Scott Salyer
  • 2,165
  • 7
  • 45
  • 82
0
votes
2 answers

How to fix this issue `Realm accessed from incorrect thread.` in swift 4

I tried to debug and trace what line the error occur , and I found out the error occur after reading the print(tcb_filteredArray) and I tried to put the print(tcb_filteredArray) below the self.tableView.reloadData() and make a debug and trace it…
jpcarts23
  • 468
  • 9
  • 16
0
votes
0 answers

Blocking main thread of a service

I am building multiprocess Android application. One of my processes contains only a remote service. Is it ok to block main thread of this process assuming there will be no activity launched and the service isn't multithreaded? This process hasn't…
user221256
  • 415
  • 5
  • 14
0
votes
1 answer

On iOS. When an app gets sent to the background, Is the app still running on the same UI thread or does it get moved to a new different thread

On iOS. When an app gets sent to the background, Is the app still running on the same UI thread or does it get moved to a new thread?
StackMan
  • 55
  • 7
0
votes
1 answer

Integrate IOS Framework (Objective C) in Kony project

I developed an IOS Framework (objective C) and want to integrate it in Kony project. The Framework function to be called will display a UIView. This function was used in Kony project to load the UI : - (void)viewDidLoad { [super viewDidLoad]; …
0
votes
1 answer

Fetch location when user forcefully quit the application in iOS

I want to fetch location in background even if user forcefully quit the app. Currently my applicationDidEnterBackground method not called when user quit the app. It only works when user simply click on the home button.
0
votes
0 answers

Toolbar display of an id specific variable from sqlite database very slow

Im using an sqlite database with provider and databasehelper. In a specific activity and some fragments (ordere by a FragmentPagerAdapter), I am trying to retrieve the name of a specific id to put it in the toolbar. I do this by creating a global…
Chris
  • 1
0
votes
0 answers

RxJava versus AsyncTask in Android

Is it considered a good practice to use RxJava instead of AsyncTask in Android? For example, if I want to make a query to database, which method would be more efficient? And If an activity finishes, does a background thread die?
0
votes
1 answer

Retrieve a lot of data from Retrofit 2 put it in SQLite and show it in recyclerview in the same time

I have a JSON query for 3000 items. At first launch my app, I have to retrieve this data and put it in SQLite, in next launches the app will get data from db or will ask api about update data. When app is putting data to db, it should show about…
MedveDomg
  • 413
  • 1
  • 4
  • 8
0
votes
1 answer

JavaFX - Call "updateMessage" for TextArea from background Task - Two problems found

I am having two problems when trying to use "updateMessage" in a JavaFX task. Issue #1 seems to be a known behavior, but I am not yet sure how exactly I can workaround it.This one is not (yet) critical to me. The problem is that not all the updates…
Stubbi
  • 1
  • 1
0
votes
0 answers

Slow transition when pushViewController is called Swift

I have the following code in ViewControllerA let layout = UICollectionViewFlowLayout() let controller = ViewControllerB (collectionViewLayout: layout) controller.contentData =…
Alk
  • 5,215
  • 8
  • 47
  • 116
0
votes
1 answer

Execute all background threads before executing another block

I am trying to load photos in Core Data but this requires some background threads, so it happens that my Object gets saved in Core Data without its photo, I get that photo is nil. And the same is happening with the photos of my groups. In short, at…
0
votes
1 answer

Changing UI from a background thread

I getting an error that Iam changing the autolayout engine from a background thread , is there's a way to know which block of code makes this warning ? or I just have to search for it by myself ?? Thank you.
user3703910
  • 624
  • 1
  • 5
  • 25
0
votes
3 answers

How to wait until onActivityResult finishes?

I have a fragment that shouldn't be opened if a user does NOT approve activation of Bluetooth, which is requested via this piece of code Intent mIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); …
0
votes
2 answers

Launching a Service in a background thread via PendingIntent

I am trying to explore the world of Services in Android and I just wrote a small example where the activity has a button that triggers a notification. The steps I do are: Creating Intent intent = new Intent(context, MyService.class); Inserting this…