= private = protected
pass()
Invokes the thread scheduler to pass execution to another thread.
a = Thread.new { print "a"; Thread.pass; print "b"; Thread.pass; print "c" } b = Thread.new { print "x"; Thread.pass; print "y"; Thread.pass; print "z" } a.join b.join
produces:
axbycz
static VALUE thread_s_pass(VALUE klass) { rb_thread_schedule(); return Qnil; }