Threads in .NET Core
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access