sfackler / r2d2

A generic connection pool for Rust
Apache License 2.0
1.51k stars 82 forks source link

Wiki and Runtime Considerations #92

Closed mattlockyer closed 5 years ago

mattlockyer commented 5 years ago

I started a Wiki to document some of the runtime situations people can expect.

https://github.com/sfackler/r2d2/wiki/Runtime-Assumptions-and-Conditions

Also my question about when there are no more connections in the pool, what happens?

IMHO there should be a timeout config and then some busy error returned. So a future could wait for a connection and optionally retry.

sfackler commented 5 years ago

It waits for the configured timeout and then returns an error: https://docs.rs/r2d2/0.8.5/r2d2/struct.Builder.html#method.connection_timeout

mattlockyer commented 5 years ago

Thanks I'll link to this.