tmapmvar-0.0.3: A single-entity stateful Map in STM, similar to tmapchan

Safe HaskellSafe
LanguageHaskell2010

Control.Concurrent.STM.TMapMVar

Contents

Synopsis

Documentation

putForceTMVar :: TMVar a -> a -> STM () Source

newtype TMapMVar k a Source

Constructors

TMapMVar 

Fields

getTMapMVar :: TVar (Map k (TMVar a))
 

keys :: TMapMVar k a -> STM [k] Source

insert :: Ord k => TMapMVar k a -> k -> a -> IO () Source

Blocks if it's full

insertForce :: Ord k => TMapMVar k a -> k -> a -> IO () Source

Doesn't Block

lookup :: Ord k => TMapMVar k a -> k -> IO a Source

Blocks, and deletes upon looking it up

tryLookup :: Ord k => TMapMVar k a -> k -> IO (Maybe a) Source

observe :: Ord k => TMapMVar k a -> k -> IO a Source

Blocks, but doesn't delete when looking it up

tryObserve :: Ord k => TMapMVar k a -> k -> IO (Maybe a) Source

delete :: Ord k => TMapMVar k a -> k -> IO () Source

Utils

getTMVar :: Ord k => TMapMVar k a -> k -> IO (TMVar a) Source