← 💻 Coding & Engineering Craft
Core
Concurrency and the GIL
Concurrency screens punish people who reach for threads without knowing what Python's GIL does. The GIL means threads do not run Python bytecode in parallel, so threads help I/O-bound work and do nothing for CPU-bound work, which needs processes. The other half is correctness: shared mutable state needs a lock, and a bounded queue is the clean way to hand work between producers and consumers without races.
a free account unlocks the core curriculum tier · no card
RELATED CONCEPTS
PRACTICE THIS IN REAL QUESTIONS
Coding & DSABuild a task scheduler: dependencies (topo sort), then priorities, then a concurrency limit→Coding & DSABuild a time-based KV store, write three real unit tests for it, then defend a locking strategy→Coding & DSAImplement a multithreaded web crawler with a thread pool, then survive the GIL and asyncio follow-ups→Coding & DSABuild a circuit breaker: closed/open/half-open with a failure window, cooldown, and a single half-open probe→System Design & Production EngineeringA service you deployed at a customer corrupts a record intermittently under concurrency. How do you find it and fix it?→Coding & DSABuild a quota manager: per-key token buckets with lazy refill, reservations, and refund on failure→
