| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Concurrent.KazuraQueue
Description
KazuraQueue is the fast queue implementation inspired by unagi-chan.
Synopsis
- data Queue a
- newQueue :: IO (Queue a)
- readQueue :: Queue a -> IO a
- readQueueWithoutMask :: Queue a -> IO a
- tryReadQueue :: Queue a -> IO (Maybe a)
- tryReadQueueWithoutMask :: Queue a -> IO (Maybe a)
- writeQueue :: Queue a -> a -> IO ()
- writeQueueWithoutMask :: Queue a -> a -> IO ()
- lengthQueue :: Queue a -> IO Int
- lengthQueue' :: Queue a -> IO Int
Documentation
readQueueWithoutMask :: Queue a -> IO a Source #
Non-masked version of readQueue.
It is not safe for asynchronous exception.
tryReadQueueWithoutMask :: Queue a -> IO (Maybe a) Source #
Non-masked version of tryReadQueue.
It is not safe for asynchronous exception.
writeQueue :: Queue a -> a -> IO () Source #
Write an item to the Queue.
The item is evaluated (WHNF) before actual queueing.
writeQueueWithoutMask :: Queue a -> a -> IO () Source #
Non-masked version of writeQueue.
It is not safe for asynchronous exception.
lengthQueue :: Queue a -> IO Int Source #
Get the length of the items in the Queue.
Caution: It returns the value which is lower than 0 when the Queue is empty and some threads are waiting for new value.
lengthQueue' :: Queue a -> IO Int Source #
Non-minus version of lengthQueue.