Skip to content

NetFabric/intelligentium / plugins/dotnet/.apm/skills/dotnet-channels

dotnet-channels

Verified

Design, implement, debug, test, and review in-process producer-consumer pipelines with System.Threading.Channels. USE FOR: Channel<T>, ChannelReader<T>, ChannelWriter<T>, bounded/unbounded queues, BoundedChannelFullMode, backpressure, TryWrite, WriteAsync, ReadAsync, ReadAllAsync, completion, cancellation, concurrent producers/consumers, BackgroundService workers, in-memory event queues, overload protection, and channel performance. DO NOT USE FOR: durable or cross-process messaging, distributed pub/sub, broker delivery guarantees, Rx.NET stream composition, task-parallel dataflow blocks, or simple thread-safe collections with no asynchronous producer-consumer requirement.

references/sources.md

View on GitHub
# Sources

## Source Precedence

1. The target framework's `System.Threading.Channels` reference assembly and source.
2. Current Microsoft Learn API and conceptual documentation.
3. Official .NET samples and test cases.
4. Practitioner articles as architecture examples, not API authority.

## Reference Links

| Source | Use |
| --- | --- |
| [Channels - .NET](https://learn.microsoft.com/dotnet/core/extensions/channels) | Primary contract, factory options, producer/consumer APIs, and concurrency patterns |
| [System.Threading.Channels API](https://learn.microsoft.com/dotnet/api/system.threading.channels) | Type signatures, exceptions, and target-framework availability |
| [Worker services](https://learn.microsoft.com/dotnet/core/extensions/workers) | `BackgroundService`, host lifecycle, and DI-hosted consumer patterns |
| [High-performance Channels article](https://antondevtips.com/blog/building-high-performance-dotnet-apps-with-csharp-channels) | Bounded worker queue and backpressure example |
| [In-memory message bus article](https://milanjovanovic.tech/blog/lightweight-in-memory-message-bus-using-dotnet-channels) | Modular-monolith event queue example and durability limitations |
| [Channels video](https://www.youtube.com/watch?v=gT06qvQLtJ0) | Supplementary conceptual walkthrough; verify claims against the preceding sources |

- `System.Threading.Channels` is part of the shared framework on .NET Core 3.0 and later; inspect the target framework before adding a package reference.
- Verify behavior against the installed target framework when relying on new overloads, item-dropped callbacks, performance claims, or implementation details.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall