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

Formale Metadaten

Titel
Trio: A pythonic way to do async programming
Serientitel
Anzahl der Teile
132
Autor
Lizenz
CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
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.