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
1
vote
0 answers

Execute the class on timer basis in mvc

I am using Asp.net MVC3 where I want to run a class on timely basis, say start of every month, without any human intervention, more of like making it an automated process. Right now I am confused between which approach to follow : Running a…
1
vote
2 answers

Android: restart search thread

I have a simple EditText with a TextChangedListener and a ListView. The onTextChanged method will call the following restartSearch method, so the current search thread should be restarted while typing into the EditText. The search method just adds…
xoxox
  • 719
  • 1
  • 13
  • 24
1
vote
1 answer

How to handle and display asynchronous data returned in a background thread in the iOS UI

I am new to using background threads to display data in the iOS UI. I am now using the Parse SDK for all of my backend data management. It seems all of the Parse methods return data asynchronously for the iOS version of the SDK. If the data is…
Atma
  • 29,141
  • 56
  • 198
  • 299
1
vote
2 answers

In WinForms.NET, how to properly update the UI in response to a background Task

I use the following Code var UiScheduler = TaskScheduler.FromCurrentSynchronizationContext(); CancellationToken cancellationToken = cancellationTokenSource.Token; const TaskContinuationOptions continuationOptions =…
1
vote
1 answer

System.Web.UI.Control.RenderControl fails when called from background thread

I have a requirement to render a control in a background thread and send the output in mail. So I have this piece of code running in a background thread: System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(sendmail), new…
pradhanbv
  • 11
  • 2
1
vote
2 answers

Updating a label from multiple background threads

I'm working on a football simulator and i have 9 matches in backgroung on separate threads. And in the method what's in the heart of each thread, there is an event. And when that even occurs (when a goal is "kicked"), I want to update a label (named…
1
vote
3 answers

How to suppress all .NET exception dialog boxes?

From my experience, an unhandled exception in a .NET application can cause a dialog box to display that describes the exception etc. Is there a way to suppress such dialog boxes completely? Would it be possible to suppress the dialog boxes only in…
CJ7
  • 22,579
  • 65
  • 193
  • 321
1
vote
1 answer

UI Freeze with Magical Record

Hello I am Riccardo and I am an indie developer! it's not a lot that I have been starting programming in objective-c, and I am still a novice! :D I started to learn Core Data and everything was going fine until I faced concurrency! With Core Data my…
1
vote
1 answer

MFC C++ Background Thread

I am making an MFC (document/view) application and I want it to constantly listen in the background for when a device is connected and then automatically copy the files on the device without the user needing to interact or pause/disturb what they…
mgalal
  • 427
  • 12
  • 24
1
vote
1 answer

iPhone Save image to documents folder task in background thread

I'm quite new to iOS programming. I've been working on a pretty simple camera app, but one major function I need to accomplish is to not only display an image taken with the built-in camera or picked from the iPhone gallery with a UIImageView, but…
JR Lipartito
  • 11
  • 1
  • 3
1
vote
1 answer

Which database operations have to be executed in background?

Im a bit confused about which operations have to be executed in background thread: Cursor curserU = myDataBase.rawQuery("some query"); startManagingCursor(curserU); curserU.moveToFirst(); curserU.someFuctionWhichWillReturnData(); is it enough if…
M364M4N cro
  • 680
  • 2
  • 10
  • 23
1
vote
5 answers

ASP.NET Background thread Performance Guidance

I am running a background thread in my asp.net web service application. This thread's responsibility is to hit database after a specific time and update a datatable in the Cache. The data table has around 500K rows. In task manager when I look in…
Imran Balouch
  • 2,170
  • 1
  • 18
  • 37
1
vote
0 answers

(iOS) Any thoughts on implementation of background thread to send periodic updates to server?

I am working on my first iOS app and looking for the best way to implement the communication channel between iOS client and the server. Basically, I need to have a background thread that would send updates to the server say every 5 minutes. From…
ymotov
  • 1,449
  • 3
  • 17
  • 28
1
vote
2 answers

How to deserialize Activity object in a background thread?

Possible Duplicate: RuntimeException: Can't create handler inside thread that has not called Looper.prepare() I have a problem with using Java Serialization mechanism in Android. It works well when invoked from the UI thread, but when I try to…
kajman
  • 1,066
  • 11
  • 24
0
votes
1 answer

Can i change UI contents form Background Thread in android?

in my android application i have created Background thread to load data from the internet into my app.In that background thread i have set some values to text fields as followings. protected Void doInBackground(Void... params)…
Dinesh Anuruddha
  • 7,137
  • 6
  • 32
  • 45