stm-lifted-2.5.0.0: Software Transactional Memory lifted to MonadIO

Safe HaskellSafe
LanguageHaskell2010

Control.Concurrent.STM.TQueue.Lifted

Synopsis

Documentation

isEmptyTQueue :: TQueue a -> STM Bool #

Returns True if the supplied TQueue is empty.

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.

newTQueue :: STM (TQueue a) #

Build and returns a new instance of TQueue

data TQueue a #

TQueue is an abstract type representing an unbounded FIFO channel.

Since: stm-2.4

Instances
Eq (TQueue a) 
Instance details

Defined in Control.Concurrent.STM.TQueue

Methods

(==) :: TQueue a -> TQueue a -> Bool #

(/=) :: TQueue a -> TQueue a -> Bool #

flushTQueueIO :: MonadIO m => TQueue a -> m [a] Source #

writeTQueueIO :: MonadIO m => TQueue a -> a -> m () Source #

unGetTQueueIO :: MonadIO m => TQueue a -> a -> m () Source #