Skip to content

Commit

Permalink
support resource-pool-0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
fumieval committed Feb 20, 2023
1 parent c88c296 commit efd28a2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
6 changes: 0 additions & 6 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
packages:
.

source-repository-package
type: git
location: https://github.com/MercuryTechnologies/pool.git
tag: 1aa551e41e3527ce23f38251567507df5357fdb9

2 changes: 1 addition & 1 deletion herp-logger.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ library
, monad-logger
, mtl
, pretty-simple
, resource-pool ^>= 0.3
, resource-pool ^>= 0.4
, safe-exceptions
, stm
, text
Expand Down
3 changes: 1 addition & 2 deletions src/Herp/Logger.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ mkThreadPool poolMaxResources errHandler = do
atomically (flushTQueue queue) >>= sequence_
cancel thread
let poolCacheTTL = 3600
let poolNumStripes = Just 1
pool <- newPool PoolConfig{..}
pool <- newPool $ setNumStripes (Just 1) $ defaultPoolConfig createResource freeResource poolCacheTTL poolMaxResources
pure pool

-- NOTE: It *blocks* when there are no threads in idle.
Expand Down

0 comments on commit efd28a2

Please sign in to comment.