Skip to content

History / Coroutines as State Machines

Revisions

  • Explain awaitable.

    @szmyd szmyd committed Jun 9, 2026
  • Add allocation-count section + correct the HALO claim Coroutines page: new "Many awaits, one frame" section — N sequential co_awaits are one fixed frame (the fewer-allocation-calls win vs Folly's Core-per-.thenValue), and a precise account of why HALO can't elide the I/O frames: they suspend cross-thread (value_awaitable::complete resumes the stored handle from a foreign thread), so the frame escapes its caller and heap allocation is mandatory, not a missed optimization. Levers are flattening forwarders / a pooled operator new, not HALO. Migration page: fix the Pillar 1 hedge that implied HALO might rescue the per-write frames — it can't; the count is chain depth, not elision. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

    @szmyd szmyd committed Jun 8, 2026
  • Add "Coroutines as State Machines" page A standalone mental-model page: the two-state lowering of a co_await function into a heap frame + a resumable switch (continuation wiring, frame reload, reentry jump), then the same suspend/resume idea as a stackful folly::fibers task for contrast, and a side-by-side table. Wired into the sidebar and Home index. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

    @szmyd szmyd committed Jun 8, 2026