Class: Raft::Goliath::EventMachineAsyncProvider

Inherits:
AsyncProvider show all
Defined in:
lib/raft/goliath.rb

Instance Method Summary collapse

Instance Method Details

#awaitObject



99
100
101
102
103
104
105
106
107
# File 'lib/raft/goliath.rb', line 99

def await
  until yield
    f = Fiber.current
    EventMachine::add_timer(0.1) do
      f.resume
    end
    Fiber.yield
  end
end