pool
pool copied to clipboard
A high-performance striped resource pooling implementation for Haskell
Under the current design, resources are kept in a `TVar` pointing to a list of resources. If a thread attempts to acquire a resource and finds the list empty it...
I created this PR primarily so that I can easily compare the differences between this and `scrive`'s upstream fork. May also be useful for others.
There are a few open PRs and issues with no replies, it seems like @bos is not actively contributing since a few years, which is understandable given his current position....
[Matt Russell](https://twitter.com/mrussell247/status/1344171747348631553) on Twitter identified that `Data.Pool` is evidently very slow with a single stripe. > Also the data.pool thing is pretty crazy. With many threads (i.e. any webserver) hitting...
This PR contains merged (conflict-resolved) branches of the following PRs: * https://github.com/bos/pool/pull/24 * https://github.com/bos/pool/pull/37 * https://github.com/bos/pool/pull/42 It also modifies a cabal file to make the package uploadable under new hackage...
Various stats about pool activity exposed via 'stats' function. Useful when tied into a monitoring framework to determine if pool is properly sized. Stats: - highwater usage - current usage...
Resolves #31 * `unliftio` provides async exception safety with `mask` * `MonadUnliftIO`, IMO, is a much better interface than `MonadBaseControl`/`MonadBase`, and we should encourage users of this library to use...
Add max reuse count for createPool. When reuse count reaches maxReuseCount, reaper destroys the resource. It is usefull to avoid resource leak.
The resource-pool library assumes that a corrupted resource will cause an action that uses to it to throw an exception. I do not think this is universally true. I have...
The definition of `destroyResource` is: ```haskell destroyResource :: Pool a -> LocalPool a -> a -> IO () destroyResource Pool{..} LocalPool{..} resource = do destroy resource `E.catch` \(_::SomeException) -> return...