Async coordination primitives#53171
Open
BillWagner wants to merge 7 commits intodotnet:mainfrom
Open
Conversation
gfoidl
reviewed
Apr 17, 2026
cc6e422 to
b27d675
Compare
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.
b27d675 to
6904e98
Compare
Contributor
There was a problem hiding this comment.
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.ymlunder 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). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… into async-coordination
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #17714 (final PR)
async-coordination-primitives.md— from "Building Async Coordination Primitives" parts 1-4 (AsyncManualResetEvent, AsyncAutoResetEvent, AsyncCountdownEvent, AsyncBarrier).async-coordination-primitives-advanced.md— from parts 5-7 (AsyncSemaphore, AsyncLock, AsyncReaderWriterLock). Note BCL equivalents (SemaphoreSlim.WaitAsync,System.Threading.Channels).Internal previews