Portability | non-portable (DeriveDataTypeable, FlexibleContexts, NoImplicitPrelude) |
---|---|
Stability | unstable (internal module) |
Maintainer | peter.trsko@gmail.com |
Safe Haskell | None |
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 = ConnectionPool (Pool (Socket, a))
- createConnectionPool :: IO (Socket, a) -> (Socket -> IO ()) -> ResourcePoolParams -> IO (ConnectionPool a)
- withConnection :: MonadBaseControl IO m => ConnectionPool a -> (Socket -> a -> m r) -> m r
Documentation
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 -> IO ()) | Release a connection which is prepresented by a |
-> ResourcePoolParams | Data type representing all |
-> 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
.