class EventMachine::Synchrony::ConnectionPool
def method_missing(method, *args, &blk)
data is available, or request is complete)
once it is complete (assumption: fiber will yield until
yield the connection within execute method and release
pool release whenever the request is complete. Otherwise
hijack the callbacks and errbacks to fire a connection
If the requesting method begins with "a" prefix, then
Allow the pool to behave as the underlying connection
def method_missing(method, *args, &blk) async = (method[0,1] == "a") execute(async) do |conn| df = conn.__send__(method, *args, &blk) if async fiber = Fiber.current df.callback { release(fiber) } df.errback { release(fiber) } end df end end