0

wait() vs sleep()

Suppose that I created a new thread (thr = Thread.new{ ... }) and I need to make it wait for an event that should occur in some other thread. If I could use sleep(), I'd write something like this: thr1 = Thread.new { slept = sleep 10.0 if slept Mike

36 comments

Please sign in to leave a comment.