Managed Thread Characteristics
Being layered on top of native threads, managed threads are in some sense richer than just native threads. For example, the state a managed thread can be in introduces a number of managed code–specific states, such as WaitSleepJoin
discussed in the previous section. Besides those differences, a whole lot of properties on Thread
reveal a lot of useful information about threads. Some of those thread settings can also be set to control their behavior.
Background Versus Foreground
A first useful property of managed threads is whether they are foreground threads or background threads. The difference between both concepts is minimal. The only altered behavior of a background thread is that it won’t keep the process from ...
Get C# 4.0 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.