~/talk

Writing Extension Modules To Be Interruptible

Talkat PyCon US 2025 · 2025-05-16..05-18· [python]
links:none on file
slides:none on file

Long-running C extensions block KeyboardInterrupt because CPython only sets a flag in the signal handler and needs extensions to call pi air check signals to make the interpreter react; naive fixes require reclaiming the GIL with pygill state insure and can make hot loops up to three to four times slower in benchmarks, while a clock-gated check reduces overhead. The uploader provides measured examples (≈3s observed delay on a simple NumPy case), a BSD-licensed helper for Linux/NetBSD, and several tool and design proposals.

AI-written summary · about

  1. 0:00The problem of unresponsive C
  2. 5:08How signals work
  3. 11:36Why interrupts are delayed
  4. 14:24Implementing fixes
  5. 20:24Measuring and optimizing
  6. 26:13Future improvements
~/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.