๐Ÿงฉ Design Patterns with .NET / C#
Home Chapters Examples Diagrams Bibliography GitHub โ†—
  1. Home
  2. Concurrency Patterns
Part 11 6 chapters

Concurrency Patterns

Patterns of usage rather than the async model: thread-safe creation, Active Object and Monitor Object on Channel, Producer-Consumer, pooling, and classic GoF patterns under concurrency.

Chapter 33

Why .NET chose stackless async

The framing chapter: green threads prototyped and rejected, and why that choice shapes every pattern that follows.

Read โ†’
Chapter 34

Thread-safe creation

Lazy, a thread-safe Singleton, and why Double-Checked Locking is now a historical note.

Read โ†’
Chapter 35

Monitor Object and Active Object on Channel

The largest gap in the literature: POSA2's patterns re-expressed on async and Channel, where the language rejects Monitor Object at compile time and two participants dissolve into Task and await foreach.

Read โ†’
Chapter 36

Producer-Consumer and pipelines as patterns

Producer-Consumer at the pattern level, with the Channels mechanics left to the concurrency reference.

Read โ†’
Chapter 37

Pools: object, connection, and ArrayPool

Resource-management patterns for pooling connections and buffers that are scarce enough to matter.

Read โ†’
Chapter 38

Classic GoF under concurrency

Observer across threads, Iterator as IAsyncEnumerable, Decorator over async, Command as Task, and immutability as a concurrency strategy.

Read โ†’
โ† Previous part Patterns the Platform Defines Next part โ†’ Patterns in the Wild
Design Patterns with .NET / C#
Tutorial content: CC BY 4.0. Sample code: Apache 2.0.
Source on GitHub โ†—  ยท  File an issue โ†—