module BlinkyTapeTestStatus::GuardCloud
Public Instance Methods
listen_for_cloud!()
click to toggle source
# File lib/blinky_tape_test_status/guard_cloud.rb, line 7 def listen_for_cloud! @semaphore = Mutex.new listener = BlinkyCloud::Listener.new @listen_thread = Thread.new { loop do listener.listen(lambda { |data| thread_write! data }) end } end
thread_write!(data)
click to toggle source
# File lib/blinky_tape_test_status/guard_cloud.rb, line 17 def thread_write!(data) @semaphore.synchronize { write! data } end