| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Control.Concurrent.Process.QSem
Description
Simple interprocess quantity semaphores
Based on POSIX or Win32 C semaphores
Documentation
QSem is a quantity semaphore in which the resource is aqcuired
   and released in units of one.
newQSem :: Int -> IO QSem Source #
Build a new QSem with a supplied initial quantity.
   The initial quantity must be at least 0.
This function throws an exception if an underlying platform-dependent function fails.
lookupQSem :: SOName QSem -> IO QSem Source #
Lookup QSem by its name in the global namespace. Use this function to init several entangled semaphores in different processes.
This function throws an exception if no QSem with this name exist,
   or if an underlying platform-dependent function fails.
waitQSem :: QSem -> IO () Source #
Wait for a unit to become available
This function throws an exception if an underlying platform-dependent function fails.