Module: Async

Extended by:
Async
Included in:
Async
Defined in:
lib/em-easy.rb

Defined Under Namespace

Classes: Enumerator

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#evented_loopObject (readonly)

Returns the value of attribute evented_loop.



10
11
12
# File 'lib/em-easy.rb', line 10

def evented_loop
  @evented_loop
end

Instance Method Details

#wait(object) ⇒ Object



48
49
50
51
52
53
# File 'lib/em-easy.rb', line 48

def wait(object)
  handle_callback = proc do
    object.callback {|*args| next_iteration Fiber.yield(*args) }
  end
  @evented_loop.resume :block => handle_callback, :smart => true
end