stm-queue-extras-0.2.0.0.1: Extra queue utilities for STM

Safe HaskellSafe
LanguageHaskell2010

Control.Concurrent.STM.Queue

Synopsis

Documentation

class Queue q where Source

Associated Types

type QueueValue q α Source

Methods

readQueue :: q α -> STM (QueueValue q α) Source

tryReadQueue :: q α -> STM (Maybe (QueueValue q α)) Source

peekQueue :: q α -> STM (QueueValue q α) Source

tryPeekQueue :: q α -> STM (Maybe (QueueValue q α)) Source

writeQueue :: q α -> α -> STM () Source

unGetQueue :: q α -> α -> STM () Source

isEmptyQueue :: q α -> STM Bool Source

awaitQueueEmpty :: Queue q => q α -> STM () Source

Block until a queue is empty.