Sha256: 9f687cdbacd8dc5f0d036398e81dacc092b64871bb8070545765f672719481e9
Contents?: true
Size: 488 Bytes
Versions: 15
Compression:
Stored size: 488 Bytes
Contents
module RevealCK module Commands describe ThreadWaker do describe '#run' do it 'wakes up an associated thread periodically' do signal = false signal_changer = Thread.new do # This sleep will be infinite unless someone wakes it up.. sleep signal = true end ThreadWaker.new(signal_changer, 0.1).run sleep 0.2 expect(signal).to eq true end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems