loom-concurrency
Installation
SKILL.md
Concurrency
Overview
Cross-language concurrency reference organized by concept, not by language. Each concept lists the shared principle plus per-language gotcha callouts for Rust (tokio), Python (asyncio), TypeScript (event loop), and Go. The hard part is never the happy-path API; it's the failure modes — data races, deadlocks, latent OOM from unbounded queues, futures dropped mid-flight by cancellation, and memory-ordering bugs that only surface under load on weakly-ordered CPUs.
Agent Delegation
- loom-senior-software-engineer (Opus) — DEFAULT. Threading models, shared-state vs message-passing, race/TOCTOU analysis, lock ordering, memory ordering, distributed concurrency/consistency, saga patterns.
- loom-software-engineer (Sonnet) — ONLY boilerplate async handlers or unit tests following an established pattern.
Mental Model: Pick the Right Executor
| Workload | Rust | Python | TS/JS | Go |
|---|---|---|---|---|
| I/O-bound | tokio tasks | asyncio | async/Promises | goroutines |
| CPU-bound | rayon / spawn_blocking |
ProcessPoolExecutor |
Worker threads | goroutines (real parallelism) |
| Blocking call in async | spawn_blocking |
run_in_executor/to_thread |
Worker | fine (goroutines block cheaply) |