Safe Haskell | None |
---|---|
Language | Haskell98 |
System.Posix.Semaphore.Unsafe
- unsafeSemTryWait :: Semaphore -> IO Bool
- unsafeSemPost :: Semaphore -> IO ()
- unsafeSemGetValue :: Semaphore -> IO Int
- unsafeSemLock :: Semaphore -> IO ()
- semTimedWait :: Int -> Int -> Semaphore -> IO Bool
- module System.Posix.Semaphore
Documentation
unsafeSemTryWait :: Semaphore -> IO Bool Source
Attempt to lock the semaphore without blocking. Immediately return False if it is not available.
unsafeSemPost :: Semaphore -> IO () Source
Unlock the semaphore.
unsafeSemGetValue :: Semaphore -> IO Int Source
Return the semaphore's current value.
unsafeSemLock :: Semaphore -> IO () Source
Attempt to lock the semaphore without blocking, and call error if the semaphore is unavailable.
This function should only be called when you want to lock the semaphore, and can guarantee that doing so will not block.
semTimedWait :: Int -> Int -> Semaphore -> IO Bool Source
Wait on a semaphore with a timeout value. Returns True if a lock was acquired, False if it timed out before acquiring a lock.
if interrupted by a signal, semTimedWait will retry. An exception will be raised if sem_timedwait() fails for any other reason.
module System.Posix.Semaphore