End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Thread.pass
Thread.pass → nil
thread.c
View on GitHub ↗
static VALUE
thread_s_pass(VALUE klass)
{
rb_thread_schedule();
return Qnil;
}
Give the thread scheduler a hint to pass execution to another thread. A running thread may or may not switch, it depends on OS and processor.
See also
.new
.pending_interrupt?
.main
.report_on_exception
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0