HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Modulebase-4.23.0.0Haskell2010

Control.Concurrent.QSemN

Quantity semaphores in which each thread may wait for an arbitrary "amount".

Contents
  1. General Quantity Semaphores
Synopsis
  • Packagebase-4.23.0.0
  • Exports4
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceQSemN.hs

General Quantity Semaphores

datadata QSemN

QSemN is a quantity semaphore in which the resource is acquired and released in arbitrary amounts. It provides guaranteed FIFO ordering for satisfying blocked waitQSemN calls.

The pattern

bracket_ (waitQSemN n) (signalQSemN n) (...)

is safe; it never loses any of the resource.