April 2018
Intermediate to advanced
300 pages
7h 41m
English
Every application in .NET starts with a single thread, which is the main thread. A thread is the basic unit that the operating system uses to allocate processor time. Each thread has a priority, exception handlers, and a data structure saved in its own thread context. If the exception is thrown, it is thrown inside the context of the thread and other threads are not affected by it. The thread context contains some low-level information about, for example, the CPU registers, the address space of the thread's host process, and so on.
If an application is running multiple threads on a single processor, each thread will be assigned a period of processor time and will be executed one after the other. The time slice is usually ...