End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Fiber::SchedulerInterface#fiber
fiber(&block)
cont.c
View on GitHub ↗
static VALUE
rb_fiber_scheduler_interface_fiber(VALUE self)
{
}
Implementation of the Fiber.schedule. The method is expected to immediately run passed block of code in a separate non-blocking fiber, and to return that Fiber.
Minimal suggested implementation is:
Example
def fiber(&block) Fiber.new(blocking: false, &block).tap(&:resume) end