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

PortabilityPOSIX
Stabilityexperimental
Maintainerbastianholst@gmx.de
Safe HaskellSafe-Inferred

Control.Concurrent.Stack

Description

A simple stack implementation with an concurrent access functions similar to that of Chan. In contrast to Chan, which is a FIFO buffer, this type is a LIFO buffer.

Synopsis

Documentation

data Stack a Source

Concurrent stack.

newStack :: IO (Stack a)Source

Build and return a new instance of Stack.

readStack :: Stack a -> IO aSource

Read the next value from the Stack.

writeStack :: Stack a -> a -> IO ()Source

Write a value into the Stack.