
M07 Concurrency
Thread-safety and async guidance for Send/Sync errors, locking choices, and deadlock or race debugging.
- skills.sh installs
- 3.8K
- GitHub stars
- 1.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the choice between CPU-bound threads and I/O-bound async, plus the sharing model for each workload
- Includes Send and Sync marker guidance, a decision flowchart for Arc, Mutex, RwLock, and channels, and common E0277 and MutexGuard-across-await fixes
- Enforces tight lock scoping and consistent lock ordering to avoid deadlocks and blocked executors
- Designed for Rust projects with web handlers, CLI tools, or trading systems that need thread-safe shared state
Install
$ npx -y skills add actionbook/rust-skills --skill m07-concurrency -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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 |
|---|---|---|
| E0277 Send | "Add Send bound" | Should this type cross threads? |
| E0277 Sync | "Wrap in Mutex" | Is shared access really needed? |
| Future not Send | "Use spawn_local" | Is async the right choice? |
| Deadlock | "Reorder locks" | Is the locking design correct? |
Thinking Prompt
Before adding concurrency:
-
What's the workload?
- CPU-bound → threads (std::thread, rayon)
- I/O-bound → async (tokio, async-std)
- Mixed → hybrid approach
-
What's the sharing model?
- No sharing → message passing (channels)
- Immutable sharing → Arc
- Mutable sharing → Arc<Mutex> or Arc<RwLock>
-
What are the Send/Sync requirements?
- Cross-thread ownership → Send
- Cross-thread references → Sync
- Single-thread async → spawn_local
Details
- Repository
- github.com/actionbook/rust-skills
- Category
- Rust
- First seen
- May 16, 2026
More from actionbook/rust-skills
All 38- M06 Error Handling3.8K
- M01 Ownership3.7K
- M05 Type Driven3.7K
- M04 Zero Cost3.7K
- M02 Resource3.7K
- Rust Refactor Helper3.7K
- M03 Mutability3.7K
- M12 Lifecycle3.6K
- M09 Domain3.6K
- M14 Mental Model3.6K
- M13 Domain Error3.6K
- M11 Ecosystem3.6K
- Unsafe Checker3.6K
- Rust Code Navigator3.6K
- Rust Trait Explorer3.5K
- Rust Call Graph3.5K
- Rust Symbol Analyzer3.5K
- Domain Web3.5K
- Domain Cli3.5K
- Rust Learner3.4K
- Rust Skill Creator3.4K
- Rust Deps Visualizer3.3K
- Meta Cognition Parallel3.3K
- Rust Daily3.3K
Similar to M07 Concurrency
More Rust
m03-mutabilityactionbook/rust-skills3.7K installsRust mutability guide mapping E0596, E0499, and E0502 errors to Cell, RefCell, Mutex, and RwLock choices.
rust-systems-programmingmanutej/luxor-claude-marketplace489 installsComplete Rust guide covering ownership, borrowing, concurrency, async, and unsafe code for memory-safe systems work.
rust-async-patternswshobson/agents22.2K installsProduction async Rust patterns for Tokio, covering tasks, channels, streams, and error handling.
m02-resourceactionbook/rust-skills3.7K installsChoosing Rust smart pointers by ownership model, thread context, and reference cycles, with a decision flowchart.
golang-concurrencysamber/cc-skills-golang44.1K installsGo concurrency design guide covering goroutine lifecycles, channels, sync primitives, and worker pools.
rustmindrally/skills827 installsExpert Rust guidance covering ownership-based safety, error handling, performance, and async programming with tokio.