This is used by Jabber::Stream internally to keep track of any blocks which were passed to Jabber::Stream#send.
# File lib/xmpp4r/stream.rb, line 322 def initialize(block) @block = block @waiter = Semaphore.new @exception = nil end
# File lib/xmpp4r/stream.rb, line 327 def call(*args) @block.call(*args) end
# File lib/xmpp4r/stream.rb, line 337 def raise(exception) @exception = exception @waiter.run end
# File lib/xmpp4r/stream.rb, line 330 def wait @waiter.wait raise @exception if @exception end
# File lib/xmpp4r/stream.rb, line 334 def wakeup @waiter.run end