Skip to content

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#block

block(blocker, timeout = nil)

Invoked by methods like Thread.join, and by Mutex, to signify that current Fiber is blocked till further notice (e.g. unblock) or till timeout will pass.

blocker is what we are waiting on, informational only (for debugging and logging). There are no guarantees about its value.

Expected to return boolean, specifying whether the blocking operation was successful or not.

See also #close #fiber also in 3.1