Open goosedb opened 2 years ago
anybody @arybczak @soareschen ?
Sounds good to me. You can add a new configuration option to PoolConfig
(a Maybe
would work best so that Nothing
represents no timeout).
This is important. When our app saturates the pool, requests start backing up, memory use explodes superlinearly, and the app crashes. With a timeout, we could fail gracefully.
There's #11, but it's abandoned. Feel free to pick it up and make it up to date if you need it, so it can be merged :slightly_smiling_face:
Can we add optional timeout for resource acquiring? Not for creating but taking resource. For now pool waits for available resource infinitely that can be a reason of dead locks.
prints
And gets stuck. Of course, it's a user-code bug. But it's better to get exception than get stuck forever
I'm ready to implement it