Talk

Rethinking AsyncIO from scratch, using Rust, for free-threaded Python

Friday, May 29

16:25 - 16:55
RoomGnocchi
LanguageEnglish
Audience levelIntermediate
Elevator pitch

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?

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.

TagsScaling, Performance and scalability techniques, Python language features
Participant

Giovanni Barillari

Physicist, software developer, SRE, OSS maintainer. Photography passionated. In love with radical honesty.