Parallelism
Managed threading model, task-based asynchrony, thread pool, concurrent collections, and TPL Dataflow.
Pages
- Managed Threads — OS thread scheduling, time slices, and the .NET threading model
- Background vs Foreground Threads — lifetime differences: foreground threads keep a process alive; background threads do not
- Threads vs Processes — process and thread relationships; threads as miniprocesses sharing an address space
- Threads vs Tasks — Tasks as lightweight abstractions over OS threads running on the thread pool
- UI Threads — WinForms and WPF UI thread dispatching and cross-thread UI updates
- Thread Pool — thread pool work-item queue, context switching reduction, and multiplexing
- Thread Local Storage — per-thread state isolation using
ThreadLocal<T>and[ThreadStatic] - TPL Collections —
System.Collections.Concurrentlock-free concurrent collections - TPL Dataflow — TPL Dataflow actor/agent model: in-process message passing, dataflow pipelines, and
C#async integration - CorrelationManager —
CorrelationManager,ExecutionContext,AsyncLocal<T>, andSystem.Diagnostics.Activity - Thread Synchronization —
Interlockedoperations,CompareExchange, memory barriers, and reentrance guards - Async and Await — asynchronous programming patterns, deadlock avoidance, async locks, context switching, and TAP
- ConfigureAwait —
ConfigureAwait(false), SynchronizationContext, and IL-level awaiter differences