distributed-process-0.4.0: Cloud Haskell: Erlang-style concurrency in Haskell

Safe HaskellNone

Control.Distributed.Process.Internal.CQueue

Description

Concurrent queue for single reader, single writer

Synopsis

Documentation

data CQueue a Source

enqueue :: CQueue a -> a -> IO ()Source

Enqueue an element

Enqueue is strict.

dequeueSource

Arguments

:: forall a b .  
=> CQueue a

Queue

-> BlockSpec

Blocking behaviour

-> [a -> Maybe b]

List of matches

-> IO (Maybe b)

Nothing only on timeout

Dequeue an element

The timeout (if any) is applied only to waiting for incoming messages, not to checking messages that have already arrived

mkWeakCQueue :: CQueue a -> IO () -> IO (Weak (CQueue a))Source

Weak reference to a CQueue