HORIZON HASKELLDocslts/ghc-10.0.x04404a62026-10-19Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 04404a6 · 2026-10-19

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.