Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Documentation
data SyncRead (d :: Type) :: Effect where Source #
An interface to a shared variable (MVar
) that can only be read.
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 |
Empty :: SyncRead d m Bool | Indicate whether the variable is empty. |
empty :: forall d r. Member (SyncRead d) r => Sem r Bool Source #
Indicate whether the variable is empty.
try :: forall d r. Member (SyncRead d) r => Sem r (Maybe d) Source #
Read the variable, returning Nothing
immmediately if no value was available.