Class: SignalWait

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

Overview

}}}

Instance Method Summary collapse

Constructor Details

#initializeSignalWait

{{{



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

def initialize
  @q = Queue.new
end

Instance Method Details

#continueObject



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

def continue
  @q.push nil
end

#wait(num = 1) ⇒ Object



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

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