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.

| Section | Topic | | --- | --- | | Evaluation model | Callables, closures, no async surface. | | Fibers and spawn | spawn, handles, join, cancel. | | Channels preview | Send/receive across fibers. | | Corelib concurrency | corelib_concurrency contracts. |

Evaluation model

12. The normative bible (and why we bothered)