·csharp-concurrency-patterns
</>

csharp-concurrency-patterns

aaronontheweb/dotnet-skills

在 .NET 中选择正确的并发抽象 - 从 I/O 的异步/等待到生产者/消费者的通道,再到用于状态实体管理的 Akka.NET。除非绝对必要,否则避免锁定和手动同步。

52安装·7热度·@aaronontheweb

安装

$npx skills add https://github.com/aaronontheweb/dotnet-skills --skill csharp-concurrency-patterns

SKILL.md

Most concurrency problems can be solved with async/await. Only reach for more sophisticated tools when you have a specific need that async/await can't address cleanly.

Try to avoid shared mutable state. The best way to handle concurrency is to design it away. Immutable data, message passing, and isolated state (like actors) eliminate entire categories of bugs.

Locks should be the exception, not the rule. When you can't avoid shared mutable state, using a lock occasionally isn't the end of the world. But if you find yourself reaching for lock, SemaphoreSlim, or other synchronization primitives regularly, step back and reconsider your design.

在 .NET 中选择正确的并发抽象 - 从 I/O 的异步/等待到生产者/消费者的通道,再到用于状态实体管理的 Akka.NET。除非绝对必要,否则避免锁定和手动同步。 来源:aaronontheweb/dotnet-skills。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/aaronontheweb/dotnet-skills --skill csharp-concurrency-patterns
分类
</>开发工具
认证
收录时间
2026-02-06
更新时间
2026-02-18

快速解答

什么是 csharp-concurrency-patterns?

在 .NET 中选择正确的并发抽象 - 从 I/O 的异步/等待到生产者/消费者的通道,再到用于状态实体管理的 Akka.NET。除非绝对必要,否则避免锁定和手动同步。 来源:aaronontheweb/dotnet-skills。

如何安装 csharp-concurrency-patterns?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/aaronontheweb/dotnet-skills --skill csharp-concurrency-patterns 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/aaronontheweb/dotnet-skills