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
2 answers

How could twitter app in android could update in "nearly" real time

I recently try twitter app on Android-based phone ( HTC HD Desire , I guest). With twitter app, when I try to 'tweet' a message, my twitter app on the phone notify the change nearly in real-time. I did some search and found out I could get…
toantran
  • 1,789
  • 17
  • 25
0
votes
1 answer

Error when user enable camera permission : java.lang.IllegalStateException: Method setCurrentState must be called on the main thread

I have an Activity which is a camera. In that activity, there is permission before using the camera, but there is a problem when the user allows the use of the camera, namely the application will return to the previous page. When the user returns to…
0
votes
1 answer

restart circularCountDowntimer when app is in background flutter

I'm using circular_countdown_timer of flutter.On every Oncomplte of the circular_countdown_timer restart timer.it is working nicely on foreground but its not working when app is in background and phone is locked. how to work restart function in…
0
votes
1 answer

Bind GridView from Background Thread

I've built a reporting function which will call several Stored Procedures before binding the final query to a GridView which then has several processes in the GridView_DataBound event before displaying the results on the page. The overall process…
Curtis
  • 101,612
  • 66
  • 270
  • 352
0
votes
1 answer

Run RxWorker on background thread

I need to run an Observable that does heavy processing on a background thread so the user doesn't feel the app freeze. I've already tried overriding getBackgroundScheduler(), but the app keeps freezing. @Override protected Scheduler…
0
votes
1 answer

Code not working after returning back from background thread

I have a tableview (file name- five.m ) which works fine and shows data in tableview properly. When a user select a row then it adds a subview which shows a Progress Indicator on the same screen. After adding subview it starts a background thread…
0
votes
0 answers

Fetching remote data with core data background context

I'm new to programming and I apologize in advance if my code makes no sense. I am completely lost with trying to fetch some json using an HTTP request and load it into Core Data. I was hoping someone might be able to provide some insight into the…
pakobongbong
  • 123
  • 1
  • 9
0
votes
1 answer

Xamarin Android Background Thread push main thread to foreground?

I have a Xamarin forms Android app that is running without problems. It consists of a foreground app that is used for configuration purposes and a background thread that listens for events. Everything works great and as expected. I was asked to add…
0
votes
1 answer

Background threading for longer tasks

I built an iOS app with the SwiftUI framework. I want to run a task for a long period of time depending on whether the user is running or not. So I used the Combine framework to start and stop some processes related to running activity using a…
Abdulmajed
  • 19
  • 5
0
votes
0 answers

Background threading assistance needed

I'm getting the dreaded "the application may be doing too much work on its main thread." I've read up on background threading, however, I don't know hoe to use it in my existing code. Please tell me which parts of the code I should post for…
0
votes
1 answer

BackgroundWorker DoWork function is not being called

I've created a loading form within my C# WinForms application that is shown during long processes. I've added a progress bar to my loading form that I would like to update to give some feedback of loading to the user. Within my loading form code, I…
0
votes
0 answers

Flask Background thread - 503 errors

I have a flask application with a background thread which is responsible for updating the data every 5 mins. Below is my implementation of it which is causing 503 errors(Service Unavailable) once in a while. What is wrong with this approach? Whats…
0
votes
2 answers

how to keep UI from waiting for a thread to complete in python flask?

I have a program that takes audio files and processes it. @app.route('/', methods=['GET', 'POST']) def hello_world(): if request.method == 'GET': return render_template('upload.html') else: file = request.files['file'] …
Kush Singh
  • 157
  • 3
  • 11
0
votes
0 answers

Running a code in background thread in android

I am new to the development of Android applications. I came across a situation where i need to execute a code in a background thread that does not do something with the UI. Based on the result obtained from the background thread I need to display an…
Kamal
  • 453
  • 1
  • 10
  • 22
0
votes
2 answers

ThreadAbortException occurs when deleting images on a background thread. ASP.NET 4

I'm using VS2010 and ASP.NET 4. I have a single, long-running background thread running in the application, which is designed to 'cleanup' the least recently used files in a folder. It uses an EventWaitHandle to eliminate uneeded CPU usage, but…