Session
The Hitchhiker's Guide to asyncio
asyncio is the de-facto standard for asynchronous programming in Python and enables concurrent operations without using threads or processes.
In this talk, we will delve into the technical details of asyncio and show how it can be used to improve the performance of Python applications. We will start by discussing the difference between threading, multiprocessing and async programming. Then, we will introduce the basic building blocks of asyncio: Event loops and Coroutines. We will dive deep into the way Coroutines work, discussing their origins and how they are linked to Generators.
Next, we will look at Tasks, which are a higher-level abstraction built on top of Coroutines. Tasks make it easy to schedule and manage the execution of Coroutines. We will cover how to create and manage Tasks and how they can be used to write concurrent code.
Finally, we will also cover some more advanced topics such as Async Loops and Context Managers, and how to handle errors and cancellations in asyncio.
First delivered at Python Milan, 8 March 2023, Milan, Italy
Also held at PyCon Italy, 24-28 May 2023, Florence, Italy
Also held at the Swiss Python Summit 2024, Zurich, Switzerland
Recorded session at https://youtu.be/q3nTbrLp4Mc?si=U9N7pWBPQ3vwJbJl
Emanuele Fabbiani
Head of AI at xtream, Professor at Catholic University of Milan
Milan, Italy
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top