~/talk

Trio: Async concurrency for mere mortals

Talkat PyCon 2018 · on Friday, 2018-05-11· [python]
slides:none on file

Claims a concrete, simpler implementation of Happy Eyeballs using Trio primitives: async/await plus nurseries and cancel scopes, events and timeouts. Replaces a callbacky Twisted routine that is roughly 120 lines with code that is shorter, easier to follow, and avoids lost background exceptions. The demo actually builds the racing/staggered connector, uses socket.getaddrinfo and concurrent attempts, cancels losers, and successfully connects (tested against debian.org). Calls out Trio.run and move_on_after style timeouts.

AI-written summary · about

  1. 0:00Start
  2. 1:17Sequential code
  3. 1:30Concurrent code
  4. 2:05Basic bidirectional proxy
  5. 3:07getaddrinfo example
  6. 5:36happy eyeballs' (RFC 8305)
  7. 6:24Happy eyeballs in Twisted
  8. 10:03Trio architecture
  9. 11:06Preemptive concurrency
  10. 11:36Cooperative (async) concurrency
  11. 18:10The basic concurrency primitive in most libraries/languages
  12. 19:32with blocks work
  13. 19:43Exceptions don't get lost
  14. 20:02Timeouts are important
  15. 21:39Exceptions in nurseries actually use cancellation
~/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.