Python · Course 8 of 9
Python: ownership and concurrency
Twelve deeper exercises in resource ownership, reference lifetimes, context propagation, cancellation, bounded work and asynchronous shutdown. Use real Python objects and tasks.
- 12 lessons
0 of 12 lessons passed
Lessons
Progress and your code are kept in this browser only.
- Unwind partially acquired resources
- Cache without owning object lifetimes
- Release resources when iteration stops early
- Restore request context after failures
- Cancel and await the task you own
- Bound task creation as well as active calls
- Share one in-flight computation per key
- Drain a bounded queue before shutdown
- Separate failures without flattening away structure
- Enforce an invariant through a data descriptor
- Preserve a callable contract in instrumentation
- Merge sorted feeds with bounded lookahead