Hello,
I need loop in a thread (A), with a sleep, and
sometime, in another thread, wakeup A on event.
I do that, but wonder if there are not a best method
with select/mutex/conditional variable
=====================
require ‘timeout’
th=Thread.new { loop {
ev=timeout(3) { Thread.stop ; true} rescue false
p “do work ev=#{ev} #{Time.now}”
} }