← Graph

Fiber

concept 2 connections

A fiber is a context of execution that can be suspended and resumed. Each Ruby thread starts with a main/default fiber and can create additional fibers to switch between. Fibers are used to implement lazy enumerators, state machines, parsers, and — the focus of Sharon's talk — cooperative concurrency, especially for IO-bound workloads. Fibers are switched with Fiber#transfer or, more generally, via a run-queue abstraction where the current fiber is re-queued and the next ready fiber is resumed.

category
architecture
Explains fibers and fiber-based concurrency in Ruby.
project UringMachine
uses
Fiber concept
UringMachine drives concurrency using Ruby fibers.

Provenance

Read by
1 extraction