Stability | experimental |
---|---|
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Safe Haskell | Safe-Inferred |
- data Buffer
- bufferQueue :: Buffer -> EventQueue
- bufferNull :: Buffer -> Dynamics Bool
- bufferFull :: Buffer -> Dynamics Bool
- bufferMaxCount :: Buffer -> Int
- bufferCount :: Buffer -> Dynamics Int
- bufferLostCount :: Buffer -> Dynamics Int
- bufferEnqueue :: Buffer -> Signal ()
- bufferDequeue :: Buffer -> Signal ()
- bufferEnqueueLost :: Buffer -> Signal ()
- newBuffer :: EventQueue -> Int -> Simulation Buffer
- dequeueBuffer :: Buffer -> Process ()
- tryDequeueBuffer :: Buffer -> Dynamics Bool
- enqueueBuffer :: Buffer -> Process ()
- tryEnqueueBuffer :: Buffer -> Dynamics Bool
- enqueueBufferOrLost :: Buffer -> Dynamics ()
Documentation
bufferQueue :: Buffer -> EventQueueSource
Return the event queue.
bufferNull :: Buffer -> Dynamics BoolSource
Test whether the queue is empty.
bufferFull :: Buffer -> Dynamics BoolSource
Test whether the queue is full.
bufferMaxCount :: Buffer -> IntSource
The maximum available number of items.
bufferCount :: Buffer -> Dynamics IntSource
Return the queue size.
bufferLostCount :: Buffer -> Dynamics IntSource
Return the number of lost items.
bufferEnqueue :: Buffer -> Signal ()Source
Return a signal that notifies when any item is enqueued.
bufferDequeue :: Buffer -> Signal ()Source
Return a signal that notifies when any item is dequeued.
bufferEnqueueLost :: Buffer -> Signal ()Source
Return a signal which notifies that the item was lost when
attempting to add it to the full queue with help of
enqueueBufferOrLost
.
newBuffer :: EventQueue -> Int -> Simulation BufferSource
Create a new queue with the specified maximum available number of items.
dequeueBuffer :: Buffer -> Process ()Source
Dequeue suspending the process if the buffer is empty.
tryDequeueBuffer :: Buffer -> Dynamics BoolSource
Try to dequeue immediately.
enqueueBuffer :: Buffer -> Process ()Source
Enqueue the item suspending the process if the buffer is full.
tryEnqueueBuffer :: Buffer -> Dynamics BoolSource
Try to enqueue the item immediately.
enqueueBufferOrLost :: Buffer -> Dynamics ()Source
Try to enqueue the item. If the buffer is full then the item will be lost.