HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Moduleconcurrency-1.11.0.3Haskell2010

Control.Concurrent.Classy.QSem

Simple quantity semaphores.

  • 1 type
  • 3 values

Simple Quantity Semaphores

4 declarations
newtypenewtype QSem (m :: Type -> Type)
#

QSem is a quantity semaphore in which the resource is acquired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked waitQSem calls.

The pattern

bracket_ qaitQSem signalSSem (...)

is safe; it never loses a unit of the resource.