abstract-deque-0.2.2: Abstract, parameterized interface to mutable Deques.

Safe HaskellSafe-Inferred

Data.Concurrent.Deque.Reference

Description

A strawman implementation of concurrent Dequeues. This implementation is so simple that it also makes a good reference implementation for debugging.

The queue representation is simply an IORef containing a Data.Sequence.

Also see Data.Concurrent.Deque.Reference.DequeInstance. By convention a module of this name is also provided.

Synopsis

Documentation

data SimpleDeque elt Source

Stores a size bound (if any) as well as a mutable Seq.

Constructors

DQ !Int !(IORef (Seq elt)) 

pushL :: SimpleDeque t -> t -> IO ()Source

pushR :: SimpleDeque t -> t -> IO ()Source