Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data TMap k v
- new :: STM (TMap k v)
- reset :: TMap k v -> STM ()
- null :: TMap k v -> STM Bool
- lookup :: Hashable k => k -> TMap k v -> STM (Maybe v)
- insert :: Hashable k => v -> k -> TMap k v -> STM ()
- delete :: Hashable k => k -> TMap k v -> STM ()
- toList :: TMap k v -> STM [(k, v)]
- filterWithKey :: (k -> v -> Bool) -> TMap k v -> STM ()
- replace :: TMap k v -> HashMap k v -> STM ()
- union :: Hashable k => TMap k v -> TMap k v -> STM (TMap k v)
- getMap :: TMap k v -> STM (HashMap k v)
- adjust :: Hashable k => (v -> v) -> k -> TMap k v -> STM ()
Documentation
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.