yet-another-logger-0.3.0: Yet Another Logger

CopyrightCopyright © 2015 PivotCloud, Inc.
LicenseApache-2.0
MaintainerLars Kuhtz <lkuhtz@pivotmail.com>
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

System.Logger.Internal.Queue

Description

 

Synopsis

Documentation

class BoundedCloseableQueue q a | q -> a where Source

Methods

newQueue :: Natural -> IO q Source

closeQueue :: q -> IO () Source

writeQueue :: q -> a -> IO Bool Source

Returns False if and only if the queue is closed. If the queue is full this function blocks.

tryWriteQueue :: q -> a -> IO (Maybe Bool) Source

Non-blocking version of writeQueue. Returns Nothing if the queue was full. Otherwise it returns 'Just True' if the value was successfully written and 'Just False' if the queue was closed.

readQueue :: q -> IO (Maybe a) Source

Returns Nothing if and only if the queue is closed. If this queue is empty this function blocks.

data TBMQueue a :: * -> *

TBMQueue is an abstract type representing a bounded closeable FIFO queue.

data TBMChan a :: * -> *

TBMChan is an abstract type representing a bounded closeable FIFO channel.