ghc-9.12.0.20241114: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Driver.MakeSem

Description

Implementation of a jobserver using system semaphores.

Synopsis

JSem: parallelism semaphore backed

runJSemAbstractSem Source #

Arguments

:: SemaphoreName

the system semaphore to use

-> (AbstractSem -> IO a)

the operation to run which requires a semaphore

-> IO a 

Implement an abstract semaphore using a semaphore Jobserver which queries the system semaphore of the given name for resources.

System semaphores

data Semaphore Source #

A system semaphore (POSIX or Win32).

newtype SemaphoreName Source #

Constructors

SemaphoreName 

Instances

Instances details
Eq SemaphoreName Source # 
Instance details

Defined in System.Semaphore

Abstract semaphores

data AbstractSem Source #

Abstraction over the operations of a semaphore.

Constructors

AbstractSem 

Fields