concurrency
Practical resources about concurrency for software engineers.
37 results
Managing Parallel Execution
Modern hardware is parallel, but writing correct concurrent code remains one of the hardest problems in software engineering. Race conditions, deadlocks, and thread starvation can cause bugs that only appear under production load.
This collection covers async patterns, thread pools, locks and mutexes, concurrent data structures, and message-passing models like CSP. Each pattern includes common pitfalls and language-specific implementation advice.
Distributed Locking with Redis and Redlock
Implement distributed locks with Redis for mutual exclusion across processes, using SET NX with TTL...
Master Async Patterns with Promises, Futures, and Coroutines
How to write efficient concurrent code using async/await, promises, futures, and coroutines in...
Thread-Safe Collections: Blocking Queues and Concurrent Maps
How to safely share collections between threads using concurrent data structures—blocking queues,...
Build Async Pipelines with C# async/await and Task.Run
Build async pipelines in C# using async/await, Task.Run, Task.WhenAll, Task.WhenAny,...
Coordinate Concurrent Tasks with Communicating
How to structure concurrent programs using channels, select statements, and goroutines for safe...
Concurrent Patterns with Go Goroutines and Channels
Build concurrent systems in Go using goroutines, channels, select statements, worker pools,...
Compose Asynchronous Pipelines with Java CompletableFuture
Build non-blocking async pipelines in Java using CompletableFuture with thenCompose, thenCombine,...
Scale Concurrent Applications with Java Virtual Threads
Scale Java applications with virtual threads from Project Loom. Use Thread.ofVirtual,...
Coordinate Shared Access with Locks, Mutexes, and Semaphores
How to prevent race conditions in concurrent programs using mutexes, read-write locks, semaphores,...
Make Concurrent HTTP Requests with Python and aiohttp
Fetch multiple APIs concurrently using asyncio and aiohttp. Covers connection pooling, rate...
Concurrent Async Tasks with asyncio.gather and Task Groups
Execute multiple async operations concurrently in Python using asyncio.gather, asyncio.TaskGroup,...
asyncio.Semaphore: Limit Concurrent API Calls in Python
Use asyncio.Semaphore in Python to cap concurrent API calls, database queries, and resource access...
APScheduler BackgroundScheduler: Prevent Overlapping Jobs
Run cron-like jobs in Python using APScheduler. Covers interval, cron, and date triggers, job...
Parallelize CPU and I/O Work with ThreadPoolExecutor
Use Python's ThreadPoolExecutor for parallel I/O operations, thread-safe result collection, Future...
Build Async Systems with Rust Tokio Runtime
Build async systems in Rust using the Tokio runtime with tasks, channels, select, synchronization...
Manage Concurrent Work with Thread Pools and Executors
How to efficiently manage worker threads using thread pools, executors, and rejection policies in...
Prevent Race Conditions in JavaScript Async Code
Identify and fix race conditions in asynchronous JavaScript using proper sequencing, atomic...
Prevent and Resolve Deadlocks in SQL Transactions
Identify deadlock patterns in SQL databases, apply consistent lock ordering, use appropriate...
Concurrent HTTP Requests with asyncio.gather and aiohttp
Fetch multiple HTTP endpoints concurrently using asyncio.gather and aiohttp with error handling,...
Leader Election Pattern
Coordinate a single active instance among multiple distributed nodes to avoid conflicts and...
No results found.