Safe Haskell | None |
---|---|
Language | GHC2021 |
Polysemy.Conc.Semaphore
Description
A quantity semaphore effect.
Synopsis
- data Semaphore (a :: Type -> Type) b
- interpretSemaphoreQ :: forall (r :: EffectRow). Member (Embed IO) r => Int -> InterpreterFor Semaphore r
- interpretSemaphoreT :: forall (r :: EffectRow). Member (Embed IO) r => Integer -> InterpreterFor Semaphore r
- signal :: forall (r :: EffectRow). Member Semaphore r => Sem r ()
- wait :: forall (r :: EffectRow). Member Semaphore r => Sem r ()
Documentation
data Semaphore (a :: Type -> Type) b Source #
This effect abstracts over the concept of a quantity semaphore, a concurrency primitive that contains a number of slots that can be acquired and released.
interpretSemaphoreQ :: forall (r :: EffectRow). Member (Embed IO) r => Int -> InterpreterFor Semaphore r Source #
interpretSemaphoreT :: forall (r :: EffectRow). Member (Embed IO) r => Integer -> InterpreterFor Semaphore r Source #