1
0
Fork 0
mirror of https://github.com/mperham/connection_pool synced 2023-03-27 23:22:21 -04:00

Document what will happen if the pool is empty.

This commit is contained in:
David Vrensk 2012-11-02 12:21:57 -06:00
parent 23b2759afd
commit ef9403a2f5

View file

@ -38,6 +38,10 @@ Then use the pool in your application:
end
```
If all the objects in the connection pool are in use, `with_connection` will block
until one becomes available. If no object is available within `:timeout` seconds,
`with_connection` will raise a `Timeout::Error`.
You can use `ConnectionPool::Wrapper` to wrap a single global connection, making
it easier to port your connection code over time: