~/talk

Enhancing AsyncIO for Complex Applications

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [python, concurrency]
slides:none on file

Explains concrete fixes: use asyncio.run manages the loop (avoid get_event_loop and manual loop.close), schedule work with asyncio.create_task, and use Queue plus Locks/Events/Conditions for coordination; install OS handlers for SIGINT/SIGTERM/SIGHUP, cancel all tasks on shutdown and flush logs/metrics to Sentry so postmortems aren’t blind. Recommends aioconsole and aiomonitor-ng shows long-running tasks (runs in a separate thread, supports 3.10+). For blocking libraries, wrap calls in ThreadPoolExecutor and incrementally port hot paths.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 3:34Concurrency coordination basics
  3. 7:54Error handling in AsyncIO
  4. 18:55Debugging AsyncIO applications
  5. 23:54Q&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.