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

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

Modulebase-4.22.0.0Haskell2010

Control.Concurrent.QSem

Simple quantity semaphores.

Contents
  1. Simple Quantity Semaphores
Synopsis
  • Packagebase-4.22.0.0
  • Exports4
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceQSem.hs

Simple Quantity Semaphores

newtypenewtype QSem

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_ waitQSem signalQSem (...)

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