Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Semaphore effect, Internal.
Documentation
data Semaphore :: Effect where 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.
Wait :: Semaphore m () | Wait until a slot is available, then acquire it. |
Signal :: Semaphore m () | Release a slot. |
Instances
type DefiningModule Semaphore Source # | |
Defined in Polysemy.Conc.Effect.Semaphore |