Rethinking AsyncIO from scratch for free-threaded Python
- Track:
- Python Core, Internals, Extensions
- Type:
- Talk
- Level:
- intermediate
- Duration:
- 30 minutes
Abstract
AsyncIO was designed with the Global Interpreter Lock (GIL) in mind: the event loop runs all of your async in a single thread, regardless of the GIL presence. Projects like trio focused on better ergonomics, but with a noticeable disadvantage in performance. What if we can have both?
In this talk we’ll explore an alternative approach to async code in Python, redesigning the whole thing from the ground up, looking at what it takes – spoiler: way less than you think – to have simpler interfaces and multi-threaded support from day zero in a single package: TonIO.