shared-buffer- A circular buffer built on shared memory

Safe HaskellNone




unsafeSemTryWait :: Semaphore -> IO BoolSource

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 IntSource

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 BoolSource

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.