distributed-process-extras-0.3.2: Cloud Haskell Extras
Control.Concurrent.Utils
Synopsis
data Lock Source #
Opaque lock.
mkExclusiveLock :: IO Lock Source #
Create exclusive lock. Only one process could take such lock.
mkQLock :: Int -> IO Lock Source #
Create quantity lock. A fixed number of processes can take this lock simultaniously.
withLock :: (MonadMask m, MonadIO m) => Lock -> m a -> m a Source #
Run action under a held lock.