unliftio-0.2.25.0: The MonadUnliftIO typeclass for unlifting monads to IO (batteries included)
Safe HaskellNone
LanguageHaskell2010

UnliftIO.QSem

Description

Unlifted Control.Concurrent.QSem.

Since: 0.2.14

Synopsis

Documentation

data QSem #

newQSem :: MonadIO m => Int -> m QSem Source #

Lifted newQSem.

Since: 0.2.14

waitQSem :: MonadIO m => QSem -> m () Source #

Lifted waitQSem.

Since: 0.2.14

signalQSem :: MonadIO m => QSem -> m () Source #

Lifted signalQSem.

Since: 0.2.14

withQSem :: MonadUnliftIO m => QSem -> m a -> m a Source #

withQSem is an exception-safe wrapper for performing the provided operation while holding a unit of value from the semaphore. It ensures the semaphore cannot be leaked if there are exceptions.

Since: 0.2.14