Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Effect of IsBackground on .Net Threads?

I know that when the main method is running and the only other threads that are running are background threads then the application exits. Other than delaying program termination or not, does a backgrounded thread do anything differently or respond differently than a non-backgrounded thread?

like image 993
Corey Ogburn Avatar asked Sep 26 '10 05:09

Corey Ogburn


1 Answers

No, they are identical to normal threads except they don't prevent a process from terminating.

From MSDN:

Background threads are identical to foreground threads, except that background threads do not prevent a process from terminating.

like image 56
Adam Sills Avatar answered Nov 20 '22 06:11

Adam Sills