~/talk

The hitchhiker's guide to asyncio

Talkat PyCon Italia 2023 · 2023-05-25..05-28· [concurrency, python]
name:Fabbiani
links:none on file
slides:none on file

Explains how the Python event loop schedules coroutines and uses the OS select call to wake when sockets are ready, demonstrates that three sequential 1s HTTP calls drop to ~1s with asyncio.gather, shows a real example creating 20 tasks with a semaphore limiting concurrency to 3 and awaiting them via TaskGroup (Python 3.11), warns that CPU‑bound coroutines block the loop and recommends thread‑pool or background tasks for heavy work.

AI-written summary · about

  1. 0:00Introduction to asyncio
  2. 2:57Concurrency vs parallelism basics
  3. 5:44Real parallelism with multi-processing
  4. 7:10Threading limitations in Python
  5. 8:33Async IO for I/O-bound tasks
  6. 9:16Core concepts of asyncio
  7. 11:29Speeding up I/O operations
  8. 13:57How asyncio event loop works
  9. 17:49Smart waiting without threads
  10. 18:53Pitfalls of asyncio misuse
  11. 19:13Real-world asyncio example
  12. 21:45Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.