Difference between background thread and foreground thread

  • Thread starter Thread starter Ioannis Vranos
  • Start date Start date
I

Ioannis Vranos

In .NET, what happens when a background thread and a foreground thread
have the same priority (e.g. Normal). Do they share the same processor time?
 
Hi Ioannis Vranos,
In .NET, what happens when a background thread and a foreground thread
have the same priority (e.g. Normal). Do they share the same processor
time?

Yes.
The difference between background and foreground thread is only the fact
that if the app terminates, any background thread will also be terminated.
Foreground threads must terminate itself before the app can terminate.


See: Foreground and Background Threads
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconthreadlevels.asp

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top