开发者

Effect of IsBackground on .Net Threads?

开发者 https://www.devze.com 2023-01-17 09:47 出处:网络
I know that when the main method is running and the only other threads that are running are background threads then the application exits. O开发者_开发知识库ther than delaying program termination or n

I know that when the main method is running and the only other threads that are running are background threads then the application exits. O开发者_开发知识库ther than delaying program termination or not, does a backgrounded thread do anything differently or respond differently than a non-backgrounded thread?


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消