Skip to content
instance method

Fiber::Scheduler#kernel_sleep

kernel_sleep(duration = nil)

Invoked by Kernel#sleep and Thread::Mutex#sleep and is expected to provide an implementation of sleeping in a non-blocking way. Implementation might register the current fiber in some list of “which fiber wait until what moment”, call Fiber.yield to pass control, and then in close resume the fibers whose wait period has elapsed.