We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Trio: A pythonic way to do async programming

Formal Metadata

Title
Trio: A pythonic way to do async programming
Title of Series
Number of Parts
132
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Concurrent programs are super useful: think of web apps juggling lots of simultaneous downloads and websocket connections, chat bots tracking multiple concurrent conversations, or web spiders fetching pages in parallel. But writing concurrent programs is complicated, intimidating to newcomers, and often challenging even for experts. Does it have to be? Python is famous for being simple and straightforward; can Python make concurrent programming simple and straightforward too? Trio is an attempt to address this question by the positive! By taking advantage of new Python 3 features (async/await keywords, async loops and context managers etc.) while dropping legacy concepts that older asynchronous frameworks has to maintain, Trio defines a new set of primitives that make it dramatically easier to write correct concurrent programs. In this talk, we will describe those primitives, and demonstrate how to use them to implement a basic algorithm for speeding up TCP connections. Compared to the best previous Python implementation, our version turns out to be easier to understand, more correct, and dramatically shorter.