Agent skill · software engineering · aj-geddes

concurrency-patterns

Implement thread-safe code, mutexes, semaphores, async/await patterns, and concurrent data structures. Use when handling parallel operations, race conditions, or building high-performance concurrent systems.

Why this skill is useful

Provides specific implementations and patterns for concurrency that the AI wouldn't reliably generate on its own.

What it needs

About 1k tokens when loaded. Last updated 2026-03-04. 307 stars on the source repository.

What this skill does

Concurrency Patterns Table of Contents Overview When to Use Quick Start Reference Guides Best Practices Overview Implement safe concurrent code using proper synchronization primitives and patterns for parallel execution. When to Use Multi-threaded applications Parallel data processing Race condition prevention Resource pooling Task coordination High-performance systems Async operations Worker pools Quick Start Minimal working example: Reference Guides Detailed implementations in the references/ directory: Guide Contents --- --- Promise Pool (TypeScript) Promise Pool (TypeScript) Mutex and Semaphore (TypeScript) Mutex and Semaphore (TypeScript) Worker Pool (Node.js) Worker Pool (Node.js) Python Threading Patterns Python Threading Patterns Async Patterns (Python asyncio) Async Patterns (Python asyncio) Go-Style Channels (Simulation) Go-Style Channels (Simulation) Best Practices ✅ DO Use proper synchronization primitives Limit concurrency to avoid resource exhaustion Handle errors in concurrent operations Use immutable data when possible Test concurrent code thoroughly Profile concurrent performance Document thread-safety guarantees ❌ DON'T Share mutable state without synchronization Use sleep/polling for coordination Create unlimited threads/workers Ignore race conditions Block event loops in async code Forget to clean up resources

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aj-geddes/concurrency-patterns

View the source on GitHub

Browse the @skills marketplace