gang-of-threads-3.2.1: Non-deterministic parallelism with bags

PortabilityPOSIX
Stabilityexperimental
Maintainerbastianholst@gmx.de
Safe HaskellSafe-Inferred

Control.Concurrent.Bag.TaskBuffer

Description

This module contains the definition of a task buffer in the IO monad, TaskBuffer, and the functions to create a Stack and a Queue buffer.

Synopsis

Documentation

data TaskBuffer a Source

A buffer holding tasks.

For this type, all access functions use the IO monad.

Constructors

TaskBuffer 

Fields

writeBuffer :: a -> IO ()
 
readBuffer :: IO a
 

data BufferType Source

The type of a buffer. At this time you can only select between Queue and Stack.

Constructors

Queue

A first in first out (FIFO) buffer.

Stack

A last in first out (LIFO) buffer.

newChanBuffer :: IO (TaskBuffer r)Source

Create a new Queue buffer from a Chan.

newStackBuffer :: IO (TaskBuffer r)Source

Create a new Stack buffer from a Stack.