Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4622

sleep until condition is true in ruby

$
0
0

Is there any better way in Ruby to sleep until some condition is true ?

loop do   sleep(1)  if ready_to_go    break  endend

Viewing all articles
Browse latest Browse all 4622


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>