Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Fiber.scheduler

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 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0