HORIZON HASKELLDocslts/ghc-9.14.xb9228482026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · b922848 · 2026-10-12

Moduleunix-2.8.8.0Haskell2010

System.Posix.Semaphore

POSIX named semaphore support.

Synopsis
  • Packageunix-2.8.8.0
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceSemaphore.hsc
valuesemWait :: Semaphore -> IO ()

Lock the semaphore, blocking until it becomes available. Since this is done through a system call, this will block the *entire runtime*, not just the current thread. If this is not the behaviour you want, use semThreadWait instead.

valuesemThreadWait :: Semaphore -> IO ()

Poll the semaphore until it is available, then lock it. Unlike semWait, this will block only the current thread rather than the entire process.