stop

Thread.stop â nil
Class Public methods

Stops execution of the current thread, putting it into a âsleep'' state, and schedules execution of another thread.

a = Thread.new { print "a"; Thread.stop; print "c" }
sleep 0.1 while a.status!='sleep'
print "b"
a.run
a.join

produces:

abc
doc_ruby_on_rails
2015-05-17 12:39:45
Comments
Leave a Comment

Please login to continue.