polysemy-conc-0.2.0.0: Polysemy Effects for Concurrency
Safe HaskellNone
LanguageHaskell2010

Polysemy.Conc.Sync

Description

 
Synopsis

Documentation

whileEmpty :: forall a r. Member (Sync a) r => Sem r () -> Sem r () Source #

Run an action repeatedly until the Sync variable is available.

whileEmptyInterval :: forall a u t d r. TimeUnit u => Members [Time t d, Sync a] r => u -> Sem r () -> Sem r () Source #

Run an action repeatedly until the Sync variable is available, waiting for the specified time between executions.

withSync :: forall d res r. Member (Scoped (SyncResources res) (Sync d)) r => InterpreterFor (Sync d) r Source #

Run an action with a locally scoped Sync variable.