~/talk

Effect handlers for C via coroutines

Talkat OOPSLA 2024 · 2024-10-20..10-25· [c-and-cpp]
links:none on file
links:none on file
name:Dan Ghica
links:none on file
slides:none on file

libseff implements effect handlers for C by representing pending computations as mutable coroutines and dispatching on reified operations (no closures), exposing a perform macro and coroutine_new/resume that takes a bitset of handleable ops. It uses segmented stacks with segment recycling so stacks remain stable and stack pointers into locals are safe, limits to 64 effect tags (numeric), and offers thread‑safe coroutines. Benchmarks run 20 million commands across deep handler stacks and a work‑stealing async scheduler plus an HTTP server show performance competitive with libhandler/libmp and surprisingly close to hyper.

AI-written summary · about

  1. 0:00Effect handlers in C
  2. 1:05Bringing effect handlers to C
  3. 3:14Constraints for embedded C
  4. 5:25Limitations of libraries
  5. 6:47Handled coroutines solution
  6. 7:49Defining effects in libf
  7. 10:20Effects with coroutines
  8. 13:30Coroutine API overview
  9. 14:32Stack handling
  10. 16:21Performance benchmarks
  11. 17:49Conclusion and future
  12. 18:53Q&A
~/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.