Loading...
Loading...
Design and review thread-based Rust concurrency with explicit ownership, sharing, and synchronization choices. Use when writing, refactoring, or reviewing threads, scoped threads, channels, Arc, Mutex, RwLock, Condvar, atomics, OnceLock, LazyLock, Send, Sync, deadlocks, or shared state.
npx skill4agent add lvtd-llc/skills rust-concurrency-primitivesstd::thread::scopeArc<Mutex<T>>Arc<RwLock<T>>OnceLockLazyLockSeqCstreferences/threading-shared-state.md| Need | Primitive |
|---|---|
| Borrow local data into short-lived threads | |
| Transfer work or results | |
| Shared read/write state | |
| Many readers, rare writers | |
| Wait for condition changes | |
| One-time global initialization | |
| Counters, flags, lock-free coordination | |
SendSyncPoisonError::into_innerArc::clone(&value)value.clone()