7 · 12 lessons

Concurrency and async

Threads, pools, locks and queues, then asyncio: tasks, timeouts, task groups, rate limits, async iterators and to_thread.

Progress and your code are kept in this browser only.

  1. 1Threads and join
  2. 2Thread pools and futures
  3. 3Race conditions and locks
  4. 4Queues for producers and consumers
  5. 5async and await
  6. 6Tasks and gather
  7. 7Timeouts and cancellation
  8. 8TaskGroup and structured concurrency
  9. 9Semaphores and rate limits
  10. 10Async generators and async for
  11. 11Async context managers
  12. 12Blocking code and to_thread