polysemy-conc-0.12.0.0: Polysemy effects for concurrency
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Conc.Effect.Gate

Description

 
Synopsis

Documentation

data Gate :: Effect where Source #

A single-use synchronization point that blocks all consumers who called gate until signal is called.

The constructors are exported from Polysemy.Conc.Gate.

Constructors

Signal :: Gate m () 
Gate :: Gate m () 

type Gates = Scoped_ Gate Source #

Convenience alias for scoped Gate.

withGate :: Member (Scoped_ Gate) r => InterpreterFor Gate r Source #

Run an action with a locally scoped Gate effect.

This avoids a dependency on Embed IO in application logic while still allowing the effect to be scoped.