Track 12 · Lesson 12 of 12
asyncio concurrency
Run many coroutines at once with tasks, gather and TaskGroup; add timeouts, handle failures, coordinate workers with queues — and build an async job scheduler.
You will be able to
- Start concurrent work with asyncio.create_task, gather and TaskGroup and collect results in a predictable order
- Put time limits on slow operations with asyncio.timeout and wait_for
- Handle failures in concurrent code with return_exceptions, try/except inside tasks and ExceptionGroup
- Coordinate producers and a fixed number of workers with asyncio.Queue
- Recognise problems where asyncio is the wrong tool
Included with a Formula Quest membership
It has 7 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.
View Formula Quest memberships
Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.