End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Fiber.scheduler
Fiber.scheduler → obj or nil
cont.c
View on GitHub ↗
static VALUE
rb_fiber_scheduler(VALUE klass)
{
return rb_scheduler_get();
}
Fiber scheduler, set in the current thread with Fiber.set_scheduler. If the scheduler is nil (which is the default), 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
-
3.0
-
Introduce
Fiber.set_schedulerfor intercepting blocking operations andFiber.schedulerfor accessing the current scheduler. See fiber.md for more details about what operations are supported and how to implement the scheduler hooks. [Feature #16786]
-