Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Lock effect, Internal
Documentation
data Lock :: Effect where Source #
An exclusive lock or mutex, protecting a region from concurrent access.
lock :: forall r a. Member Lock r => Sem r a -> Sem r a Source #
Run an action if the lock is available, block otherwise.
lockOr :: forall r a. Member Lock r => Sem r a -> Sem r a -> Sem r a Source #
Run an action if the lock is available, block otherwise.