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.
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 ...