TonIO, a Multi-threaded Async Runtime for Python - Talk Python to Me Ep. 561
How many cores does your machine have, 10, 18? Your async Python code uses just one of them. That isn't a bug in asyncio. That's the design, and optimizing event loops to be faster by 20% doesn't change it. So Giovanni Barillari started over. Joe is the creator of Granian, the Rust-based server that powers Talk Python. His new project is TonIO, an async runtime written from scratch for free-threaded Python. Real threads, a handful of primitives instead of asyncio's pile of them, and it flat out refuses to start if the GIL is on. ▬▬▬▬ About the podcast ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ This video is the uncut, live recording of the Talk Python To Me podcast ( https://talkpython.fm ). We cover Python-focused topics every week and publish the edited and polished version in audio form. Subscribe in your podcast player of choice (100% free) at https://talkpython.fm/subscribe. ▬▬▬▬ Guests ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Giovanni Barillari ▬▬▬▬ Links and resources from the show ▬▬▬▬▬▬▬▬▬▬▬▬ Granian: https://github.com/emmett-framework/granian Hyper: https://github.com/hyperium/hyper Free threaded Python: https://docs.python.org/3/howto/free-threading-python.html#freethreading-python-howto Sort of: https://labs.quansight.org/blog/free-threaded-one-year-recap did a whole course: https://training.talkpython.fm/courses/python-concurrency-deep-dive uvloop: https://github.com/magicstack/uvloop rloop: https://github.com/gi0baro/rloop TonIO: https://github.com/gi0baro/tonio your EuroPython 2026 talk: https://www.youtube.com/watch?v=3GwyadhJZBQ&list=PLQHk3YPV3Dgk&index=4&t=753s Michael's Cutting Python Web App Memory Over 31% Article: https://mkennedy.codes/posts/cutting-python-web-app-memory-over-31-percent/ ▬▬▬▬ Dive deeper ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Listen to the Talk Python To Me podcast at https://talkpython.fm and explore over 275 hours of Python courses at https://training.talkpython.fm/courses. ▬▬▬▬ Follow us on Social ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Mastodon: Michael - https://fosstodon.org/@mkennedy & Talk Python - https://fosstodon.org/@talkpython Bluesky: Michael - https://bsky.app/profile/mkennedy.codes & Talk Python - https://bsky.app/profile/talkpython.fm X: Michael - https://x.com/mkennedy & Talk Python - https://x.com/talkpython