Concurrency
A for-range over a channel that's never closed leaks the receiver. Why a fixed number of receives is safe, why a range isn't, and how to catch it with Go 1.27's leak profile.
Notes on Go's accepted goroutine leak profile and how it reuses the GC to find them.
A Go closure holds a live reference to whatever it captures, not a snapshot. Real examples of where this trips people up, and how to keep it boring.
Why your mutex wrapper should accept a closure for mutation instead of a plain value, with examples from the standard library and Tailscale.
How Go 1.20's WithCancelCause and Go 1.21's WithTimeoutCause let you attach a reason to context cancellation, plus a gotcha with manual cancel and the stdlib pattern that covers every path.
How Python and Kotlin provide structured concurrency out of the box while Go achieves the same patterns explicitly using errgroup, WaitGroup, and context.
Prevent goroutine leaks caused by early returns with unbuffered channels. Learn buffering, draining, errgroup patterns, and goleak testing.
Prevent dangerous struct copies with noCopy sentinel and go vet's copylock checker. Protect mutexes and sync primitives from value copies.
Control goroutine concurrency with buffered channels as semaphores. Prevent resource exhaustion with backpressure patterns in Go workers.
Gracefully shutdown Python's ThreadingTCPServer with signal handlers for SIGINT, SIGTERM handling and client notification on server shutdown.
Build a pausable socket server with Python's socketserver module using threading for intermittent request handling and background tasks.
Display progress bars for concurrent Python tasks using tqdm with ThreadPoolExecutor and as_completed for real-time execution monitoring.
Process large CSV files without OOM errors by streaming content line-by-line with HTTPX and concurrent.futures for parallel processing.
Speed up Django bulk operations with ProcessPoolExecutor while preserving signals and hooks that bulk_create/bulk_update bypass.
Control concurrent async requests with Python asyncio.Semaphore to respect rate limits and prevent overwhelming APIs or services.