method

pass

v1_8_6_287 - Show latest stable - Class: Thread
pass()
public

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