base-4.6.0.0: Basic libraries

Portabilitynon-portable (concurrency)
Stabilityexperimental
Maintainerlibraries@haskell.org
Safe HaskellTrustworthy

Control.Concurrent.QSem

Contents

Description

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

Simple quantity semaphores.

Synopsis

Simple Quantity Semaphores

data QSem Source

A QSem is a simple quantity semaphore, in which the available "quantity" is always dealt with in units of one.

Instances

newQSem :: Int -> IO QSemSource

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

waitQSem :: QSem -> IO ()Source

Wait for a unit to become available

signalQSem :: QSem -> IO ()Source

Signal that a unit of the QSem is available