Hoogle Search
Within LTS Haskell 24.45 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
semaphore-compat System.Semaphore No documentation available.
SemaphoreName :: String -> SemaphoreNamesemaphore-compat System.Semaphore No documentation available.
createSemaphore :: SemaphoreName -> Int -> IO Semaphoresemaphore-compat System.Semaphore Create a new semaphore with the given name and initial amount of available resources. Throws an error if a semaphore by this name already exists.
destroySemaphore :: Semaphore -> IO ()semaphore-compat System.Semaphore Destroy the given semaphore.
forkWaitOnSemaphoreInterruptible :: Semaphore -> (Either SomeException Bool -> IO ()) -> IO WaitIdsemaphore-compat System.Semaphore Spawn a thread that waits on the given semaphore. In this thread, asynchronous exceptions will be masked. The waiting operation can be interrupted using the interruptWaitOnSemaphore function. This implements a similar pattern to the forkFinally function.
freshSemaphore :: String -> Int -> IO Semaphoresemaphore-compat System.Semaphore Create a fresh semaphore with the given amount of tokens. Its name will start with the given prefix, but will have a random suffix appended to it.
getSemaphoreName :: SemaphoreName -> Stringsemaphore-compat System.Semaphore No documentation available.
getSemaphoreValue :: Semaphore -> IO Intsemaphore-compat System.Semaphore Query the current semaphore value (how many tokens it has available). This is mainly for debugging use, as it is easy to introduce race conditions when nontrivial program logic depends on the value returned by this function.
interruptWaitOnSemaphore :: WaitId -> IO ()semaphore-compat System.Semaphore Interrupt a semaphore wait operation initiated by forkWaitOnSemaphoreInterruptible.
openSemaphore :: SemaphoreName -> IO Semaphoresemaphore-compat System.Semaphore Open a semaphore with the given name. If no such semaphore exists, throws an error.