Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- isFullTBQueue :: TBQueue a -> STM Bool
- isEmptyTBQueue :: TBQueue a -> STM Bool
- lengthTBQueue :: TBQueue a -> STM Natural
- unGetTBQueue :: TBQueue a -> a -> STM ()
- tryPeekTBQueue :: TBQueue a -> STM (Maybe a)
- peekTBQueue :: TBQueue a -> STM a
- flushTBQueue :: TBQueue a -> STM [a]
- tryReadTBQueue :: TBQueue a -> STM (Maybe a)
- readTBQueue :: TBQueue a -> STM a
- writeTBQueue :: TBQueue a -> a -> STM ()
- newTBQueue :: Natural -> STM (TBQueue a)
- data TBQueue a
- newTBQueueIO :: MonadIO m => Natural -> m (TBQueue a)
- readTBQueueIO :: MonadIO m => TBQueue a -> m a
- tryReadTBQueueIO :: MonadIO m => TBQueue a -> m (Maybe a)
- flushTBQueueIO :: MonadIO m => TBQueue a -> m [a]
- peekTBQueueIO :: MonadIO m => TBQueue a -> m a
- tryPeekTBQueueIO :: MonadIO m => TBQueue a -> m (Maybe a)
- writeTBQueueIO :: MonadIO m => TBQueue a -> a -> m ()
- unGetTBQueueIO :: MonadIO m => TBQueue a -> a -> m ()
- lengthTBQueueIO :: MonadIO m => TBQueue a -> m Natural
- isEmptyTBQueueIO :: MonadIO m => TBQueue a -> m Bool
- isFullTBQueueIO :: MonadIO m => TBQueue a -> m Bool
Documentation
isFullTBQueue :: TBQueue a -> STM Bool #
unGetTBQueue :: TBQueue a -> a -> STM () #
Put a data item back onto a channel, where it will be the next item read. Blocks if the queue is full.
tryPeekTBQueue :: TBQueue a -> STM (Maybe a) #
A version of peekTBQueue
which does not retry. Instead it
returns Nothing
if no value is available.
peekTBQueue :: TBQueue a -> STM a #
Get the next value from the TBQueue
without removing it,
retrying if the channel is empty.
flushTBQueue :: TBQueue a -> STM [a] #
Efficiently read the entire contents of a TBQueue
into a list. This
function never retries.
Since: stm-2.4.5
tryReadTBQueue :: TBQueue a -> STM (Maybe a) #
A version of readTBQueue
which does not retry. Instead it
returns Nothing
if no value is available.
readTBQueue :: TBQueue a -> STM a #
Read the next value from the TBQueue
.
writeTBQueue :: TBQueue a -> a -> STM () #
Write a value to a TBQueue
; blocks if the queue is full.
Builds and returns a new instance of TBQueue
.
TBQueue
is an abstract type representing a bounded FIFO channel.
Since: stm-2.4
readTBQueueIO :: MonadIO m => TBQueue a -> m a Source #
flushTBQueueIO :: MonadIO m => TBQueue a -> m [a] Source #
peekTBQueueIO :: MonadIO m => TBQueue a -> m a Source #
writeTBQueueIO :: MonadIO m => TBQueue a -> a -> m () Source #
unGetTBQueueIO :: MonadIO m => TBQueue a -> a -> m () Source #