Corey Ogburn
Corey Ogburn

Reputation: 24769

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?

Upvotes: 6

Views: 4925

Answers (2)

Nilesh Gule
Nilesh Gule

Reputation: 1621

You can look at the explanation given in this book on Threading http://www.albahari.com/threading/

Upvotes: 0

Adam Sills
Adam Sills

Reputation: 17062

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.

Upvotes: 11

Related Questions