End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Fiber#alive?
fiber.alive? → true or false
cont.c
View on GitHub ↗
VALUE
rb_fiber_alive_p(VALUE fiber_value)
{
return FIBER_TERMINATED_P(fiber_ptr(fiber_value)) ? Qfalse : Qtrue;
}
Returns true if the fiber can still be resumed (or transferred to). After finishing execution of the fiber block this method will always return false. You need to require 'fiber' before using this method.
See also
.yield
#backtrace
.set_scheduler
#backtrace_locations
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1