@@ -82,6 +82,16 @@ createConnectionPool
8282createConnectionPool conninfo stripes idle maxResrc =
8383 createPool (connectdb conninfo) finish stripes idle maxResrc
8484
85+{-|
86+Temporarily take a connection from a `Pool`, perform an action with it,
87+and return it to the pool afterwards.
88+
89+If the pool has an idle connection available, it is used immediately.
90+Otherwise, if the maximum number of connections has not yet been reached,
91+a new connection is created and used.
92+If the maximum number of connections has been reached, this function blocks
93+until a connection becomes available.
94+-}
8595usingConnectionPool
8696 :: MonadUnliftIO io
8797 => Pool (K Connection schemas) -- ^ pool