| base-4.1.0.0: Basic libraries | Source code | Contents | Index

Control.Concurrent.QSemN

Portability | non-portable (concurrency)
Stability | experimental
Maintainer | libraries@haskell.org

Contents

General Quantity Semaphores

Description
Quantity semaphores in which each thread may wait for an arbitrary "amount".
Synopsis

data QSemN
newQSemN :: Int -> IO QSemN
waitQSemN :: QSemN -> Int -> IO ()
signalQSemN :: QSemN -> Int -> IO ()

General Quantity Semaphores

data QSemN | Source

A `QSemN` is a quantity semaphore, in which the available "quantity" may be signalled or waited for in arbitrary amounts.
Instances

Typeable QSemN

newQSemN :: Int -> IO QSemN | Source

Build a new `QSemN` with a supplied initial quantity.

waitQSemN :: QSemN -> Int -> IO () | Source

Wait for the specified quantity to become available

signalQSemN :: QSemN -> Int -> IO () | Source

Signal that a given quantity is now available from the `QSemN`.
Produced by Haddock version 2.4.2