What problem does it solve?
Concurrency bugs are a major source of instability in asynchronous and multi-threaded code. This Skill helps identify and fix race conditions, atomicity violations, and improper lock management that lead to incorrect behavior and hard-to-diagnose failures.
Core Features & Use Cases
- TOCTOU prevention: Encourage atomic operations and safe synchronization to avoid race checks followed by actions.
- Atomic multi-step operations: Promote transactional patterns and careful locking to ensure state remains consistent.
- Lock ordering and cancellation safety: Enforce consistent lock acquisition order and safe cancellation/shutdown handling.
- Usage scenarios: For Rust/Tokio async code, systems relying on mutexes, RwLocks, channels, or task spawning to coordinate shared state.
Quick Start
Provide a small Rust async function that updates a shared counter under a mutex without holding the lock during any await.