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

How to avoid background thread in iOS 9

I'm working on app and I used custom tableview cell to dispalay data.when my app runs it gives this warning. This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This…
Jobs
  • 269
  • 2
  • 6
  • 21
0
votes
1 answer

Run something in the background with the highest priority possible

In Android, how can I run something in the background with the highest priority possible? I understand I could use a foreground service, but I don't want to show a notification to the user. I need to run something that is CPU-intense but…
0
votes
0 answers

Setting text of label in cell after request in Swift

I'm working on an app in Swift that makes a request to a server pulls back JSON and parses it into a schedule. I have table view controller with 7 cells and a label in each. I am aiming to change the text of each label after the request. @IBOutlet…
Isaac Wasserman
  • 1,461
  • 4
  • 19
  • 39
0
votes
1 answer

Restart a python script from backround_thread

I've been spending some time in searching for the correct code but I got no luck. I have below python script with background thread and a main prog.. I want to restart the script once the background thread encounters a condition. Hope you can help…
iGreenius
  • 33
  • 1
  • 5
0
votes
1 answer

Life cycle of an IntentService if it also have a BackgroundThread

I have a task, which should happen sequentially. Post-processing it should do few tasks parallelly. I am using BackgroundThread in IntentService. is this a good approach or should I take any other approach?
0
votes
0 answers

Google app engine: Performance differences between background thread and a task queue

In my GAE app, there are some tasks which were being performed in taskqueues, asynchronously. These tasks involve fetching data from an API and processing it. As the app matured, the data grew in size so the taskqueue limit of 10 minutes started to…
0
votes
0 answers

How to run a task for the first time instantly using ScheduledExecutorService?

I have a task which I need to run every 6 AM in the morning. I have my below code which does the job and it is using ScheduledExecutorService. ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); Calendar calendar =…
john
  • 11,311
  • 40
  • 131
  • 251
0
votes
1 answer

How do I process a bitmap in a background thread in Android?

I created an Android application where I can process the filter to a bitmap in the onCreate method of the layout. However, I want to filter the bitmap in another thread instead of the UI thread.
Pankaj
  • 11
  • 1
  • 11
0
votes
2 answers

Doesn't MagicalRecord work in background thread?

It seems I tried everything but it seems it works in main thread only. For example: [SomeClass MR_createEntity]; [[NSManagedObjectContext MR_defaultContext] MR_saveWithOptions:MRSaveSynchronously completion:^(BOOL success, NSError *error) { …
Gargo
  • 1,135
  • 1
  • 10
  • 21
0
votes
0 answers

COMException + background thread + WPF

I am trying to use a COM component & activeX component in a WPF application. I am using these components via the background thread, so UI remains responsive. But the problem is I sometimes get a COM Exception while using these components. (not…
Sandepku
  • 861
  • 14
  • 31
0
votes
1 answer

white screen when using runOnUiThread

I am having an experiment of onTouchListener. The aim is to move the FrameLayout to wherever I touch. The 1st version of code gives me a “viewroot$calledfromwrongthreadexception” error. So in the 2nd version, I try to use runOnUiThread to solve the…
0
votes
2 answers

StackOverFlow Exception using Background Thread in vb.NET

i'm using a background Thread in vb.net to connect/reconnect to a device. It's working fine, but after around 2 hours, the programm is throwing a stackoverflow exception, in the following part of my code: if connected = True then …
0
votes
1 answer

Unable to override touch and forceinterrupt methods in Xamarin Thread

I have created android application in Eclipse java and which should be quit after 30mins if it is idle. I have used the following like for doing this. Application idle time I have tried the same in Xamarin Android, but it showing following error in…
Ponmalar
  • 6,871
  • 10
  • 50
  • 80
0
votes
1 answer

Can't change a value in my array?

In my program I am holding the pixel data of a UIImage in a basic C array: // It can be UInt8 as it is greyscaled, values can only be 0-255 @property (nonatomic, readwrite) UInt8 *imageData; Now in my greyscaling algorithm I initialize it:…
Alex
  • 2,405
  • 4
  • 23
  • 36