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

Safe HaskellSafe
LanguageHaskell2010

Control.Concurrent.STM.TMapMVar.Hash

Contents

Synopsis

Documentation

newtype TMapMVar k a Source #

Constructors

TMapMVar 

Fields

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

peekElems :: TMapMVar k a -> STM [a] Source #

insert :: (Eq k, Hashable k) => TMapMVar k a -> k -> a -> STM () Source #

Blocks if it's full

insertForce :: (Eq k, Hashable k) => TMapMVar k a -> k -> a -> STM () Source #

Doesn't Block

lookup :: (Eq k, Hashable k) => TMapMVar k a -> k -> STM a Source #

Blocks, and deletes upon looking it up

tryLookup :: (Eq k, Hashable k) => TMapMVar k a -> k -> STM (Maybe a) Source #

observe :: (Eq k, Hashable k) => TMapMVar k a -> k -> STM a Source #

Blocks, but doesn't delete when looking it up

tryObserve :: (Eq k, Hashable k) => TMapMVar k a -> k -> STM (Maybe a) Source #

delete :: (Eq k, Hashable k) => TMapMVar k a -> k -> STM () Source #

Utils

getTMVar :: (Eq k, Hashable k) => TMapMVar k a -> k -> STM (TMVar a) Source #