instance method
Fiber::Scheduler#block
block(blocker, timeout = nil)
scheduler.c
View on GitHub ↗
VALUE
rb_fiber_scheduler_block(VALUE scheduler, VALUE blocker, VALUE timeout)
{
return rb_funcall(scheduler, id_block, 2, blocker, timeout);
}
Invoked by methods like Thread.join, and by Thread::Mutex, to signify that current Fiber is blocked until further notice (e.g. unblock) or until timeout has elapsed.
blocker is what we are waiting on, informational only (for debugging and logging). There are no guarantee about its value.
Expected to return boolean, specifying whether the blocking operation was successful or not.