Skip to content
← All tracks

Concurrency Without Regret

Python

`asyncio` as it is in 2026: TaskGroup, `asyncio.timeout`, cancellation semantics, backpressure and structured concurrency.

This track is written for Python, which isn't the mode you're browsing in.

0 / 15 solved · 23 articles
  1. 1. What the GIL Actually Guarantees Read
  2. 2. Atomicity Illusions: Check-Then-Act and Read-Modify-Write Read
  3. 3. Not solved yet. BoundedCounter: check-then-act under 64 threads
  4. 4. Threading Primitives Beyond Lock Read
  5. 5. Not solved yet. BoundedBuffer: a blocking queue from one Condition
  6. 6. Thread Lifecycle: Daemons, Swallowed Exceptions, Graceful Shutdown Read
  7. 7. Not solved yet. run_workers: results, errors and a join deadline
  8. 8. concurrent.futures: ThreadPoolExecutor Done Properly Read
  9. 9. Not solved yet. map_with_failures: partial success on a thread pool
  10. 10. asyncio.run, Runner, and the Death of get_event_loop Read
  11. 11. Not solved yet. run_sync: the sync boundary a library should expose
  12. 12. Typing Async Code: Coroutine vs Awaitable vs AsyncIterator Read
  13. 13. Not solved yet. A Fetcher Protocol three implementations can satisfy
  14. 14. Tasks, Task Lifetime, and the Fire-and-Forget GC Bug Read
  15. 15. Not solved yet. BackgroundTasks: strong references, and a drain that raises
  16. 16. TaskGroup Supersedes gather Read
  17. 17. Not solved yet. fetch_all: structured fan-out with TaskGroup
  18. 18. Cancellation: CancelledError Is a Protocol, Not an Error Read
  19. 19. Not solved yet. with_cleanup: bounded cleanup on every exit path
  20. 20. Timeouts: asyncio.timeout Supersedes wait_for Read
  21. 21. Not solved yet. Deadline: one budget, many nested scopes
  22. 22. Async Context Managers: __aenter__ Returns Self, __aexit__ Returns bool | None Read
  23. 23. asyncio.Queue: Backpressure, join/task_done, and Shutdown Read
  24. 24. Not solved yet. process_stream: a bounded pipeline that cannot hang
  25. 25. Bridging Blocking Code: to_thread, Executors, Cross-Thread Scheduling Read
  26. 26. Not solved yet. asyncify: a ParamSpec wrapper that does not block the loop
  27. 27. Graceful Shutdown of an asyncio Service Read
  28. 28. Not solved yet. Service.serve: a shutdown that is bounded and returns
  29. 29. Debugging Async in Production Read
  30. 30. contextvars Across Tasks and Threads Read
  31. 31. Not solved yet. request_context: an id that survives tasks and threads
  32. 32. Eager Tasks and asyncio Performance Read
  33. 33. Concurrency Limiters Are Not Rate Limiters Read
  34. 34. asyncio vs anyio and trio Read
  35. 35. mypy vs pyright for Async Code Read
  36. 36. Choosing a Concurrency Model: A Decision Procedure Read
  37. 37. Deterministic Concurrency Testing Read
  38. 38. Not solved yet. Capstone: a typed, cancellable, observable worker pool

Check yourself

4 questions · one attempt each

These do not count toward finishing the track. They are here to catch the things that are easy to read past.

0 / 4

A thread holding a threading.Lock calls a method that acquires the same lock. What happens?

l = threading.Lock()
l.acquire()
l.acquire(blocking=False)

rl = threading.RLock()
rl.acquire(); rl.acquire()
Question 1 of 4