Skip to content
Beskid The Beskid Book

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

11. Fibers: cheaper than threads, still scary

Cooperative spawn, Fiber handles, channels, and corelib concurrency without async/await cosplay.

Fibers: cheaper than threads, still scary

Threads are expensive. async/await is threads with extra syntax and conference talks. Beskid uses spawn and Fiber<T>—cooperative fibers, channel-only cross-fiber data, and no async keyword because we have seen your previous codebase.

Normative: Fibers and spawn. Runtime: Fiber scheduler and stacks. API: Concurrency package.

SectionTopic
Evaluation modelCallables, closures, no async surface.
Fibers and spawnspawn, handles, join, cancel.
Channels previewSend/receive across fibers.
Corelib concurrencycorelib_concurrency contracts.

Evaluation model

12. The normative bible (and why we bothered)