strict-stm-1.0.0.1: Strict STM interface polymorphic over stm implementation.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Concurrent.Class.MonadSTM.Strict.TMVar

Description

This module corresponds to TMVar in "stm" package

Synopsis

StrictTMVar

data StrictTMVar m a Source #

TMVar that keeps its value in WHNF at all times

Does not support an invariant: if the invariant would not be satisfied, we would not be able to put a value into an empty TMVar, which would lead to very hard to debug bugs where code is blocked indefinitely.

type LazyTMVar m = TMVar m Source #

newTMVar :: MonadSTM m => a -> STM m (StrictTMVar m a) Source #

newTMVarIO :: MonadSTM m => a -> m (StrictTMVar m a) Source #

putTMVar :: MonadSTM m => StrictTMVar m a -> a -> STM m () Source #

swapTMVar :: MonadSTM m => StrictTMVar m a -> a -> STM m a Source #

deprecated api

newTMVarM :: MonadSTM m => a -> m (StrictTMVar m a) Source #

Deprecated: Use newTVarIO

newEmptyTMVarM :: MonadSTM m => m (StrictTMVar m a) Source #

Deprecated: Use newEmptyTMVarIO

MonadLabelledSTM

MonadTraceSTM

traceTMVar :: MonadTraceSTM m => proxy m -> StrictTMVar m a -> (Maybe (Maybe a) -> Maybe a -> InspectMonad m TraceValue) -> STM m () Source #