graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.GraphQL.Execute.Subscription.TMap

Synopsis

Documentation

newtype TMap k v Source #

A coarse-grained transactional map implemented by simply wrapping a HashMap in a TVar. Compared to StmContainers.Map, this provides much faster iteration over the elements at the cost of significantly increased contention on writes.

Constructors

TMap 

Fields

new :: STM (TMap k v) Source #

reset :: TMap k v -> STM () Source #

null :: TMap k v -> STM Bool Source #

lookup :: (Eq k, Hashable k) => k -> TMap k v -> STM (Maybe v) Source #

insert :: (Eq k, Hashable k) => v -> k -> TMap k v -> STM () Source #

delete :: (Eq k, Hashable k) => k -> TMap k v -> STM () Source #

toList :: TMap k v -> STM [(k, v)] Source #

filterWithKey :: (k -> v -> Bool) -> TMap k v -> STM () Source #

replace :: TMap k v -> HashMap k v -> STM () Source #

union :: (Eq k, Hashable k) => TMap k v -> TMap k v -> STM (TMap k v) Source #

getMap :: TMap k v -> STM (HashMap k v) Source #