base-4.6.0.0: Basic libraries

Portabilitynon-portable (concurrency)
Stabilityexperimental
Maintainer[email protected]
Safe HaskellTrustworthy

Control.Concurrent.QSemN

Contents

Description

Deprecated: Control.Concurrent.QSemN will be removed in GHC 7.8. Please use an alternative, e.g. the SafeSemaphore package, instead.

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

Synopsis

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

newQSemN :: Int -> IO QSemNSource

Build a new QSemN with a supplied initial quantity. The initial quantity must be at least 0.

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.