Go quirks: function closures capturing mutable referencesA 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.Redowan Delowar·Apr 25·6 min readFollowGoConcurrency
Mutate your locked state inside a closureWhy your mutex wrapper should accept a closure for mutation instead of a plain value, with examples from the standard library and Tailscale.Redowan Delowar·Mar 5·6 min readFollowGoConcurrencyAPI
What canceled my Go context?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.Redowan Delowar·Feb 24·12 min readFollowGoError HandlingConcurrency
Structured concurrency & GoHow Python and Kotlin provide structured concurrency out of the box while Go achieves the same patterns explicitly using errgroup, WaitGroup, and context.Redowan Delowar·Feb 21·14 min readFollowGoPythonKotlinConcurrency
Early return and goroutine leakPrevent goroutine leaks caused by early returns with unbuffered channels. Learn buffering, draining, errgroup patterns, and goleak testing.Redowan Delowar·Sep 7·4 min readFollowGoConcurrencyTesting
Preventing accidental struct copies in GoPrevent dangerous struct copies with noCopy sentinel and go vet's copylock checker. Protect mutexes and sync primitives from value copies.Redowan Delowar·Apr 21·4 min readFollowGoTILConcurrency
Limit goroutines with buffered channelsControl goroutine concurrency with buffered channels as semaphores. Prevent resource exhaustion with backpressure patterns in Go workers.Redowan Delowar·Aug 23·4 min readFollowGoTILConcurrency
Signal handling in a multithreaded socket serverGracefully shutdown Python's ThreadingTCPServer with signal handlers for SIGINT, SIGTERM handling and client notification on server shutdown.Redowan Delowar·Feb 26·8 min readFollowPythonNetworkingConcurrency
Pausing and resuming a socket server in PythonBuild a pausable socket server with Python's socketserver module using threading for intermittent request handling and background tasks.Redowan Delowar·Feb 5·5 min readFollowPythonNetworkingConcurrency
Using tqdm with concurrent.fututes in PythonDisplay progress bars for concurrent Python tasks using tqdm with ThreadPoolExecutor and as_completed for real-time execution monitoring.Redowan Delowar·Jan 6·2 min readFollowPythonConcurrency
Stream process a CSV file in PythonProcess large CSV files without OOM errors by streaming content line-by-line with HTTPX and concurrent.futures for parallel processing.Redowan Delowar·Jul 1·4 min readFollowPythonNetworkingConcurrency
Bulk operations in Django with process poolSpeed up Django bulk operations with ProcessPoolExecutor while preserving signals and hooks that bulk_create/bulk_update bypass.Redowan Delowar·Jun 27·3 min readFollowPythonDjangoConcurrencyDatabase
Limit concurrency with semaphore in Python asyncioControl concurrent async requests with Python asyncio.Semaphore to respect rate limits and prevent overwhelming APIs or services.Redowan Delowar·Feb 10·3 min readFollowPythonAsyncConcurrency
Effortless concurrency with Python's concurrent.futuresMaster Python's concurrent.futures module for easy threading and multiprocessing. Learn ThreadPoolExecutor and ProcessPoolExecutor with examples.Redowan Delowar·Apr 21·13 min readFollowPythonConcurrency