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
It's often
hardugly to use ConnectionPool's concurrency in a performant way (read: without the wrapper). I modified theConnectionPool#with
method so that it returns whatever its block returns.Look more like this