·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