polysemy-conc-0.7.0.0: Polysemy Effects for Concurrency
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Conc.Effect.SyncRead

Description

The effect SyncRead is equivalent to Sync without the write actions.

Synopsis

Documentation

data SyncRead (d :: Type) :: Effect where Source #

An interface to a shared variable (MVar) that can only be read.

Constructors

Block :: SyncRead d m d

Read the variable, waiting until a value is available.

Wait :: TimeUnit u => u -> SyncRead d m (Maybe d)

Read the variable, waiting until a value is available or the timeout has expired.

Try :: SyncRead d m (Maybe d)

Read the variable, returning Nothing immmediately if no value was available.

Empty :: SyncRead d m Bool

Indicate whether the variable is empty.

Instances

Instances details
type DefiningModule SyncRead Source # 
Instance details

Defined in Polysemy.Conc.Effect.SyncRead

type DefiningModule SyncRead = "Polysemy.Conc.Effect.SyncRead"