AsyncIO born in a GIL world: event loops are designed to be single-threaded. But with the introduction of free-threaded Python, we no longer need to worry about the GIL. Can we rewrite AsyncIO to run async code in a multi-threaded fashion?
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.