Reorganize channels.md: show basics before bounding strategies, add multiple readers/writers example#52334
Open
Reorganize channels.md: show basics before bounding strategies, add multiple readers/writers example#52334
Conversation
…ultiple readers/writers example Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix badly organised content in channels documentation
Reorganize channels.md: show basics before bounding strategies, add multiple readers/writers example
Mar 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the System.Threading.Channels documentation to improve learning flow and adds a new end-to-end example demonstrating concurrent multiple producers and consumers sharing a single channel.
Changes:
- Added a new “Basic usage” section with a simple producer/consumer example.
- Added a new “Multiple producers and consumers” section and a corresponding snippet demonstrating fan-out/fan-in over a single channel.
- Updated/normalized several xref links and some wording in the article.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
docs/core/extensions/channels.md |
Adds “Basic usage”, adds multi-producer/multi-consumer section, and adjusts section structure/xrefs. |
docs/core/extensions/snippets/channels/Program.MultipleReadersWriters.cs |
New snippet that demonstrates 3 producers and 2 consumers using an unbounded channel with multi-reader/writer options. |
You can also share your feedback on Copilot code review. Take the survey.
docs/core/extensions/snippets/channels/Program.MultipleReadersWriters.cs
Show resolved
Hide resolved
docs/core/extensions/snippets/channels/Program.MultipleReadersWriters.cs
Outdated
Show resolved
Hide resolved
docs/core/extensions/snippets/channels/Program.MultipleReadersWriters.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
gewarren
reviewed
Mar 18, 2026
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
gewarren
reviewed
Mar 18, 2026
docs/core/extensions/snippets/channels/Program.MultipleReadersWriters.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
gewarren
reviewed
Mar 19, 2026
docs/core/extensions/snippets/channels/Program.MultipleReadersWriters.cs
Outdated
Show resolved
Hide resolved
gewarren
reviewed
Mar 19, 2026
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.
The
System.Threading.Channelsarticle introduced bounding strategies before covering the producer/consumer APIs, and had no end-to-end example of concurrent multiple producers and consumers.Changes
Program.MultipleReadersWriters.cs— fan-out/fan-in pattern usingTask.WhenAll,ReadAllAsync, and a singleWriter.Complete()after all producers finish.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Internal previews