Skip to content
class method

Fiber.scheduler

() -> untyped?
Fiber.scheduler → obj or nil

Returns the Fiber scheduler, that was last set for the current thread with Fiber.set_scheduler. Returns nil if no scheduler is set (which is the default), and non-blocking fibers’ behavior is the same as blocking. (see “Non-blocking fibers” section in class docs for details about the scheduler concept).

Ruby version changes

  1. 3.0
See also .schedule .set_scheduler .new .yield also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0