~/talk

Why Should Async Get All The Love Advanced Control Flow With Threads

Talkat PyCon US 2022 · 2022-04-27..05-03· [python]
slides:none on file

Claim: threads match or beat async for throughput and work with existing frameworks like Flask and requests while async wins on memory for huge idle connection counts (threads ~10k each, async tasks ~2k). Shows concrete tools: concurrent.futures, ThreadPoolExecutor, executor.map, as_completed. Demonstrates a Paxos-style discovery service and a Flask server run on a background thread. Notes real limits: cancellation with threads is awkward (handmade cancellation token) and structured-concurrency semantics are not fully supported.

AI-written summary · about

  1. 0:00Start
  2. 2:05Threads and Asyncio
  3. 2:16Not Parallelism
  4. 3:30Concurrency
  5. 7:10What Web Frameworks Do You Use?
  6. 7:49Threads vs Asyncio
  7. 10:51It's Time To Take Another Look At Threads
  8. 12:54Executors
  9. 14:18Workflows
  10. 19:37Cancellation
  11. 21:13Real Life Example
  12. 26:58Cool Threads
~/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.