Skip to content

Async coordination primitives#53171

Open
BillWagner wants to merge 7 commits intodotnet:mainfrom
BillWagner:async-coordination
Open

Async coordination primitives#53171
BillWagner wants to merge 7 commits intodotnet:mainfrom
BillWagner:async-coordination

Conversation

@BillWagner
Copy link
Copy Markdown
Member

@BillWagner BillWagner commented Apr 16, 2026

Fixes #17714 (final PR)

  1. Create async-coordination-primitives.md — from "Building Async Coordination Primitives" parts 1-4 (AsyncManualResetEvent, AsyncAutoResetEvent, AsyncCountdownEvent, AsyncBarrier).
  2. Create async-coordination-primitives-advanced.md — from parts 5-7 (AsyncSemaphore, AsyncLock, AsyncReaderWriterLock). Note BCL equivalents (SemaphoreSlim.WaitAsync, System.Threading.Channels).
  3. Heavy modernization needed: update all code for current .NET idioms, call out which primitives now have framework equivalents.
  4. Add both to TOC under a "Coordination primitives" sub-section.

Internal previews

📄 File 🔗 Preview link
docs/navigate/advanced-programming/toc.yml docs/navigate/advanced-programming/toc
docs/standard/asynchronous-programming-patterns/async-coordination-primitives-advanced.md Async semaphores, locks, and reader/writer coordination
docs/standard/asynchronous-programming-patterns/async-coordination-primitives.md "Build async coordination primitives"

Fixes dotnet#17714 (final PR)

1. Create `async-coordination-primitives.md` — from "Building Async Coordination Primitives" parts 1-4 (AsyncManualResetEvent, AsyncAutoResetEvent, AsyncCountdownEvent, AsyncBarrier).
1. Create `async-coordination-primitives-advanced.md` — from parts 5-7 (AsyncSemaphore, AsyncLock, AsyncReaderWriterLock). **Note BCL equivalents** (`SemaphoreSlim.WaitAsync`, `System.Threading.Channels`).
1. **Heavy modernization needed:** update all code for current .NET idioms, call out which primitives now have framework equivalents.
1. Add both to TOC under a "Coordination primitives" sub-section.
@BillWagner BillWagner marked this pull request as ready for review April 30, 2026 20:38
@BillWagner BillWagner requested a review from a team as a code owner April 30, 2026 20:38
Copilot AI review requested due to automatic review settings April 30, 2026 20:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds two new conceptual docs under asynchronous programming patterns that modernize and consolidate guidance on async coordination primitives, along with runnable C# and Visual Basic snippet projects, and links the content from the advanced programming TOC.

Changes:

  • Added two new articles: one covering educational “build-it-yourself” primitives, and one covering built-in primitives plus advanced educational implementations.
  • Added C# and Visual Basic snippet projects for both articles.
  • Added both articles to docs/navigate/advanced-programming/toc.yml under a new “Coordination primitives” subsection.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
docs/standard/asynchronous-programming-patterns/async-coordination-primitives.md New article describing educational implementations (manual/auto reset, countdown, barrier) with snippet references.
docs/standard/asynchronous-programming-patterns/async-coordination-primitives-advanced.md New article focusing on built-in primitives and advanced coordination patterns with snippet references.
docs/navigate/advanced-programming/toc.yml Adds the two new articles under a new “Coordination primitives” node.
docs/standard/asynchronous-programming-patterns/snippets/async-coordination-primitives/csharp/Program.cs C# snippet implementations and demos for the “build” article.
docs/standard/asynchronous-programming-patterns/snippets/async-coordination-primitives/csharp/AsyncCoordinationPrimitives.csproj C# snippet project for the “build” article (net10.0).
docs/standard/asynchronous-programming-patterns/snippets/async-coordination-primitives/vb/Program.vb VB snippet implementations and demos for the “build” article.
docs/standard/asynchronous-programming-patterns/snippets/async-coordination-primitives/vb/AsyncCoordinationPrimitives.vbproj VB snippet project for the “build” article (net10.0).
docs/standard/asynchronous-programming-patterns/snippets/async-coordination-primitives-advanced/csharp/Program.cs C# snippet implementations and demos for the “advanced” article.
docs/standard/asynchronous-programming-patterns/snippets/async-coordination-primitives-advanced/csharp/AsyncCoordinationPrimitivesAdvanced.csproj C# snippet project for the “advanced” article (net10.0).
docs/standard/asynchronous-programming-patterns/snippets/async-coordination-primitives-advanced/vb/Program.vb VB snippet implementations and demos for the “advanced” article.
docs/standard/asynchronous-programming-patterns/snippets/async-coordination-primitives-advanced/vb/AsyncCoordinationPrimitivesAdvanced.vbproj VB snippet project for the “advanced” article (net10.0).

Comment thread docs/standard/asynchronous-programming-patterns/async-coordination-primitives.md Outdated
BillWagner and others added 3 commits May 1, 2026 11:13
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create plan for porting relevant blog posts to docs

3 participants