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 TasksTasks 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 CollectionsSystem.Collections.Concurrent lock-free concurrent collections
  • TPL DataflowTPL Dataflow actor/agent model: in-process message passing, dataflow pipelines, and C# async integration
  • CorrelationManagerCorrelationManager, ExecutionContext, AsyncLocal<T>, and System.Diagnostics.Activity
  • Thread SynchronizationInterlocked operations, CompareExchange, memory barriers, and reentrance guards
  • Async and Await — asynchronous programming patterns, deadlock avoidance, async locks, context switching, and TAP
  • ConfigureAwaitConfigureAwait(false), SynchronizationContext, and IL-level awaiter differences
< «

Table of contents