unliftio-pool-0.2.2.0: Data.Pool generalized to MonadUnliftIO.
Safe HaskellNone
LanguageHaskell2010

UnliftIO.Pool

Documentation

type Pool = Pool Source #

createPool :: MonadUnliftIO m => m a -> (a -> m ()) -> Int -> NominalDiffTime -> Int -> m (Pool a) Source #

withResource :: MonadUnliftIO m => Pool a -> (a -> m b) -> m b Source #

tryWithResource :: MonadUnliftIO m => Pool a -> (a -> m b) -> m (Maybe b) Source #

destroyResource :: MonadUnliftIO m => Pool a -> LocalPool a -> a -> m () Source #

putResource :: MonadUnliftIO m => LocalPool a -> a -> m () Source #