run

thr.run â thr
Instance Public methods

Wakes up thr, making it eligible for scheduling.

1
2
3
4
5
a = Thread.new { puts "a"; Thread.stop; puts "c" }
sleep 0.1 while a.status!='sleep'
puts "Got here"
a.run
a.join

produces:

1
2
3
a
Got here
c
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.