distributed-process-extras-0.3.5: Cloud Haskell Extras

Safe HaskellSafe
LanguageHaskell98

Control.Concurrent.Utils

Synopsis

Documentation

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.