mperham/connection_pool — pull request #59 by fhsjaagshs (2014-06-13 15:08:45+00:00)
Title: Return value from ConnectionPool#with

It's often ~~hard~~ ugly to use ConnectionPool's concurrency in a performant way (read: without the wrapper). I modified the `ConnectionPool#with` method so that it returns whatever its block returns.

def exec(sql)
res = nil
@pool.with { |pg| res = pg.exec sql }
res
end

Look more like this

def exec(sql)
@pool.with { |pg| pg.exec sql }
end