Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- isEmptyTQueue :: TQueue a -> STM Bool
- unGetTQueue :: TQueue a -> a -> STM ()
- tryPeekTQueue :: TQueue a -> STM (Maybe a)
- peekTQueue :: TQueue a -> STM a
- flushTQueue :: TQueue a -> STM [a]
- tryReadTQueue :: TQueue a -> STM (Maybe a)
- readTQueue :: TQueue a -> STM a
- writeTQueue :: TQueue a -> a -> STM ()
- newTQueue :: STM (TQueue a)
- data TQueue a
- newTQueueIO :: MonadIO m => m (TQueue a)
- readTQueueIO :: MonadIO m => TQueue a -> m a
- tryReadTQueueIO :: MonadIO m => TQueue a -> m (Maybe a)
- flushTQueueIO :: MonadIO m => TQueue a -> m [a]
- peekTQueueIO :: MonadIO m => TQueue a -> m a
- tryPeekTQueueIO :: MonadIO m => TQueue a -> m (Maybe a)
- writeTQueueIO :: MonadIO m => TQueue a -> a -> m ()
- unGetTQueueIO :: MonadIO m => TQueue a -> a -> m ()
- isEmptyTQueueIO :: MonadIO m => TQueue a -> m Bool
Documentation
unGetTQueue :: TQueue a -> a -> STM () #
Put a data item back onto a channel, where it will be the next item read.
tryPeekTQueue :: TQueue a -> STM (Maybe a) #
A version of peekTQueue
which does not retry. Instead it
returns Nothing
if no value is available.
peekTQueue :: TQueue a -> STM a #
Get the next value from the TQueue
without removing it,
retrying if the channel is empty.
flushTQueue :: TQueue a -> STM [a] #
Efficiently read the entire contents of a TQueue
into a list. This
function never retries.
Since: stm-2.4.5
tryReadTQueue :: TQueue a -> STM (Maybe a) #
A version of readTQueue
which does not retry. Instead it
returns Nothing
if no value is available.
readTQueue :: TQueue a -> STM a #
Read the next value from the TQueue
.
writeTQueue :: TQueue a -> a -> STM () #
Write a value to a TQueue
.
TQueue
is an abstract type representing an unbounded FIFO channel.
Since: stm-2.4
newTQueueIO :: MonadIO m => m (TQueue a) Source #
readTQueueIO :: MonadIO m => TQueue a -> m a Source #
flushTQueueIO :: MonadIO m => TQueue a -> m [a] Source #
peekTQueueIO :: MonadIO m => TQueue a -> m a Source #
writeTQueueIO :: MonadIO m => TQueue a -> a -> m () Source #
unGetTQueueIO :: MonadIO m => TQueue a -> a -> m () Source #