~/talk

Using Asyncio in Python 3

Talkat PyCon APAC 2019 · on Saturday, 2019-02-23· [python, reactive-programming, developer-experience]
slides:none on file

Demonstrates Asyncio and async/await on Python 3.7 with a concrete race condition: two threads incrementing and decrementing a counter over 40,000 increments shows nonzero result under threading but zero under asyncio. Builds a working restaurant simulator ported from threads to coroutines, removing locks and using tasks, futures, cancellation and timeouts. Measures overhead and scaling to 10,000 coroutines, highlights needing occasional yields for CPU work and when to run blocking code in executors.

AI-written summary · about

  1. 0:00Start
  2. 3:47Pre-Emptive Multitasking
  3. 10:25Using async Io and Quarantines
  4. 14:31Usage Classic Hello World Example
  5. 28:08Restaurant Simulator
  6. 39:25Caches
  7. 42:18Swallowed Exceptions
~/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.