connection-pool- Connection pool built on top of resource-pool and streaming-commons.

Portabilitynon-portable (DeriveDataTypeable, FlexibleContexts, NoImplicitPrelude)
Stabilityunstable (internal module)
Safe HaskellNone



Internal packages are here to provide access to internal definitions for library writers, but they should not be used in application code.

Preferably use qualified import, e.g.:

 import qualified Data.ConnectionPool.Internal.ConnectionPool as Internal

This module doesn't depend on streaming-commons and other non-HaskellPlatform packages with notable exception of resource-pool. Another notable thing is that this package is not OS specific. Please, bear this in mind when doing modifications.



newtype ConnectionPool a Source

Simple specialized wrapper for Pool.


ConnectionPool (Pool (Socket, a)) 



:: IO (Socket, a)

Acquire a connection which is prepresented by a Socket. There might be additional information associated with specific connection that we represent here as a sencond type in a tuple. Such information are considered read only and aren't passed to release function (see next argument).

-> (Socket -> IO ())

Release a connection which is prepresented by a Socket.

-> ResourcePoolParams

Data type representing all createPool parameters that describe internal Pool parameters.

-> IO (ConnectionPool a)

Created connection pool that is parametrised by additional connection details.

Specialized wrapper for createPool, see its documentation for details.

withConnection :: MonadBaseControl IO m => ConnectionPool a -> (Socket -> a -> m r) -> m rSource

Specialized wrapper for withConnection.