resource-pool

A high-performance striped resource pooling implementation

LTS Haskell 24.0:0.4.0.0
Stackage Nightly 2025-07-16:0.5.0.0
Latest on Hackage:0.5.0.0

See all snapshots resource-pool appears in

BSD-3-Clause licensed by Andrzej Rybczak, Bryan O'Sullivan
Maintained by [email protected]
This version can be pinned in stack with:resource-pool-0.5.0.0@sha256:10aa71ad1d064f49a74d6bd52e3b0b1d3836f50cb6d70da4ba054e0475c3060c,1618

Module documentation for 0.5.0.0

resource-pool

CI Hackage Stackage LTS Stackage Nightly

A high-performance striped resource pooling implementation for Haskell based on QSem.

Changes

resource-pool-0.5.0.0 (2025-06-13)

  • Drop support for GHC < 8.10.
  • Use STM based lockless implementation as it results in much better throughput in a multi-threaded environment when number of stripes is not equal to the number of capabilities (in particular with a single stripe).
  • Stop running resource freeing functions within uninterruptibleMask.
  • destroyResource no longer ignores exceptions thrown from resource releasing functions.
  • Change the default number of stripes to 1.
  • Do not exceed the maximum number of resources if the number of stripes does not divide it.
  • Add support for assigning a label to the pool.

resource-pool-0.4.0.0 (2023-01-16)

  • Require poolMaxResources to be not smaller than the number of stripes.
  • Add support for setting the number of stripes.
  • Hide the constructor of PoolConfig from the public API and provide defaultPoolConfig so that future additions to PoolConfig don’t require major version bumps.

resource-pool-0.3.1.0 (2022-06-15)

  • Add tryWithResource and tryTakeResource.

resource-pool-0.3.0.0 (2022-06-01)

  • Rewrite based on Control.Concurrent.QSem for better throughput and latency.
  • Make release of resources asynchronous exceptions safe.
  • Remove dependency on monad-control.
  • Expose the .Internal module.
  • Add support for introspection.
  • Add PoolConfig.