← Graph

Run Queue

concept 2 connections

Abstraction that holds fibers ready to run. Replaces hardwired fiber-to-fiber transfers: a fiber_switch method adds the current fiber to the tail of the run queue and resumes the fiber at the head. When the run queue is empty, there is no CPU-bound work left and the scheduler can safely block on IO (IO.select, or in UringMachine's case io_uring completions). Makes concurrency universal and dynamic — fibers can be created on the fly without knowing about each other.

category
pattern
Introduces the run-queue abstraction to mediate fiber switching.
project UringMachine
uses
Run Queue concept
A UringMachine instance is an io_uring instance plus a run queue for fibers.

Provenance