Class: SignalWait

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby/riddl/client.rb

Overview

}}}

Instance Method Summary collapse

Constructor Details

#initializeSignalWait

{{{



23
24
25
# File 'lib/ruby/riddl/client.rb', line 23

def initialize
  @q = Queue.new
end

Instance Method Details

#continueObject



31
32
33
# File 'lib/ruby/riddl/client.rb', line 31

def continue
  @q.push nil
end

#wait(num = 1) ⇒ Object



27
28
29
# File 'lib/ruby/riddl/client.rb', line 27

def wait(num=1)
  num.times{ @q.deq }
end