~/talk

Understanding Non-blocking IO

Talkat EuroPython 2015 · 2015-07-20..07-26· [python, web-performance]
speakerdeck:vaidik
slides:none on file

Shows how Python sockets go non‑blocking with setblocking(False), how send returns a partial byte count when the kernel buffer fills, and how using select (or poll/epoll/kqueue) avoids a wasteful busy loop. Demonstrates a generator-based event loop that interleaves sending 70 MB (which blocks for ~45s in the blocking version) with a CPU task, maps fds to generators, and actually works as a simple cooperative scheduler; select scales poorly past ~4000 fds.

AI-written summary · about

  1. 0:00Start
  2. 0:26High Level Overview
  3. 1:24Some Background
  4. 2:58What is Blocking?
  5. 7:13Non-Blocking I/O
  6. 11:47Non-Blocking Network I/O in Python
  7. 18:41Understanding select()
~/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.