class EventMachine::Synchrony::ConnectionPool
def acquire(fiber)
- if connection is available, pass it back to the calling block
Acquire a lock on a connection and assign it to executing fiber
def acquire(fiber) if conn = @available.pop @reserved[fiber.object_id] = conn conn else Fiber.yield @pending.push fiber acquire(fiber) end end