Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Fiber::Scheduler#unblock

unblock(blocker, fiber)

Invoked to wake up Fiber previously blocked with block (for example, Thread::Mutex#lock calls block and Thread::Mutex#unlock calls unblock). The scheduler should use the fiber parameter to understand which fiber is unblocked.

blocker is what was awaited for, but it is informational only (for debugging and logging), and it is not guaranteed to be the same value as the blocker for block.

See also #timeout_after #yield #process_wait also in 4.0 · 3.4 · 3.3 · 3.2