m07-concurrency

Installation
Summary

Rust concurrency design: workload classification, sharing models, and Send/Sync requirements.

  • Guides decision-making between threads (CPU-bound), async (I/O-bound), and hybrid approaches before implementing
  • Covers Send/Sync marker traits, thread-safety patterns (Arc, Mutex, RwLock, channels), and atomic operations with quick reference tables
  • Includes mandatory "trace up" to domain skills (web, fintech, cloud-native, CLI) to align concurrency design with architectural constraints
  • Highlights anti-patterns like holding MutexGuard across await, ignoring deadlock risk, and overusing Arc<Mutex> for message passing
SKILL.md

Concurrency

Layer 1: Language Mechanics

Core Question

Is this CPU-bound or I/O-bound, and what's the sharing model?

Before choosing concurrency primitives:

  • What's the workload type?
  • What data needs to be shared?
  • What's the thread safety requirement?

Error → Design Question

Error Don't Just Say Ask Instead
Related skills

More from zhanghandong/rust-skills

Installs
744
GitHub Stars
1.1K
First Seen
Jan 20, 2026