-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A time-ordered multimap which consumes values as you lookup
--
-- A time-ordered multimap which consumes values as you lookup
@package tmapchan
@version 0.0.1
module Control.Concurrent.STM.TMapChan.Hash
newtype TMapChan k a
TMapChan :: TVar (HashMap k (TChan a)) -> TMapChan k a
[runTMapChan] :: TMapChan k a -> TVar (HashMap k (TChan a))
newTMapChan :: STM (TMapChan k a)
insert :: (Eq k, Hashable k) => TMapChan k a -> k -> a -> STM ()
insertMany :: (Eq k, Hashable k) => TMapChan k a -> k -> [a] -> STM ()
-- | Inserts the element to the head of the stack, to be viewed next
insertFirst :: (Eq k, Hashable k) => TMapChan k a -> k -> a -> STM ()
-- | Blocks until there's a value available to remove from the mutlimap
lookup :: (Eq k, Hashable k) => TMapChan k a -> k -> STM a
tryLookup :: (Eq k, Hashable k) => TMapChan k a -> k -> STM (Maybe a)
lookupAll :: (Eq k, Hashable k) => TMapChan k a -> k -> STM [a]
-- | Blocks until there's a vale available to view, without removing it
observe :: (Eq k, Hashable k) => TMapChan k a -> k -> STM a
tryObserve :: (Eq k, Hashable k) => TMapChan k a -> k -> STM (Maybe a)
observeAll :: (Eq k, Hashable k) => TMapChan k a -> k -> STM [a]
-- | Deletes the next element in the map, if it exists. Doesn't
-- block.
delete :: (Eq k, Hashable k) => TMapChan k a -> k -> STM ()
-- | Clears the queue at the key
deleteAll :: (Eq k, Hashable k) => TMapChan k a -> k -> STM ()
-- | Creates a new one if it doesn't already exist
getTChan :: (Eq k, Hashable k) => TMapChan k a -> k -> STM (TChan a)
broadcast :: (Eq k, Hashable k) => TMapChan k a -> a -> STM ()
cloneAt :: (Eq k, Hashable k) => TMapChan k a -> k -> k -> STM ()
-- | Clones all the content for every key, by the key.
cloneAll :: (Eq k, Hashable k) => TMapChan k a -> k -> STM ()
-- | Clones all the content from every channel, and inserts the unique
-- subset of them to k, in an unspecified order.
cloneAllUniquely :: (Eq k, Hashable k, Eq a, Hashable a) => TMapChan k a -> k -> STM ()
module Control.Concurrent.STM.TMapChan
newtype TMapChan k a
TMapChan :: TVar (Map k (TChan a)) -> TMapChan k a
[runTMapChan] :: TMapChan k a -> TVar (Map k (TChan a))
newTMapChan :: STM (TMapChan k a)
insert :: Ord k => TMapChan k a -> k -> a -> STM ()
insertMany :: Ord k => TMapChan k a -> k -> [a] -> STM ()
-- | Inserts the element to the head of the stack, to be viewed next
insertFirst :: Ord k => TMapChan k a -> k -> a -> STM ()
-- | Blocks until there's a value available to remove from the mutlimap
lookup :: Ord k => TMapChan k a -> k -> STM a
tryLookup :: Ord k => TMapChan k a -> k -> STM (Maybe a)
lookupAll :: Ord k => TMapChan k a -> k -> STM [a]
-- | Blocks until there's a vale available to view, without removing it
observe :: Ord k => TMapChan k a -> k -> STM a
tryObserve :: Ord k => TMapChan k a -> k -> STM (Maybe a)
observeAll :: Ord k => TMapChan k a -> k -> STM [a]
-- | Deletes the next element in the map, if it exists. Doesn't
-- block.
delete :: Ord k => TMapChan k a -> k -> STM ()
-- | Clears the queue at the key
deleteAll :: Ord k => TMapChan k a -> k -> STM ()
-- | Creates a new one if it doesn't already exist
getTChan :: Ord k => TMapChan k a -> k -> STM (TChan a)
-- | Insert for every key
broadcast :: Ord k => TMapChan k a -> a -> STM ()
cloneAt :: Ord k => TMapChan k a -> k -> k -> STM ()
-- | Clones all the content for every key, by the key.
cloneAll :: Ord k => TMapChan k a -> k -> STM ()
-- | Clones all the content from every channel, and inserts the unique
-- subset of them to k, in the order of their Ord instance
cloneAllUniquely :: (Ord k, Ord a) => TMapChan k a -> k -> STM ()