semaphore-compat: Cross-platform abstraction for system semaphores

[ bsd3, library, system ] [ Propose Tags ]

This package provides a cross-platform implementation of system semaphores that abstracts over the unix and Win32 libraries.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0
Change log changelog.md
Dependencies base (>=4.11 && <4.20), exceptions (>=0.7 && <0.11), unix (>=2.8.1.0 && <2.9), Win32 (>=2.13.4.0 && <2.15) [details]
License BSD-3-Clause
Author The GHC team
Maintainer ghc-devs@haskell.org
Revised Revision 2 made by sheaf at 2024-03-27T13:37:06Z
Category System
Home page https://gitlab.haskell.org/ghc/semaphore-compat
Bug tracker https://gitlab.haskell.org/ghc/ghc/issues/new
Source repo head: git clone https://gitlab.haskell.org/ghc/semaphore-compat.git
Uploaded by sheaf at 2023-03-13T14:58:19Z
Distributions NixOS:1.0.0
Reverse Dependencies 2 direct, 14681 indirect [details]
Downloads 410 total (35 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-03-13 [all 1 reports]

Readme for semaphore-compat-1.0.0

[back to package description]

semaphore-compat

semaphore-compat provides a cross-platform implementation of system semaphores that abstracts over the unix and Win32 libraries.

It supports:

  • Creating (createSemaphore, freshSemaphore), opening (openSemaphore) and closing (destroySemaphore) semaphores.
  • Waiting on a semaphore:
    • without blocking with tryWaitOnSemaphore,
    • blocking forever, with waitOnSemaphore,
    • blocking, in a separate thread and allowing interruption, with forkWaitOnSemaphoreInterruptible and interruptWaitOnSemaphore.
  • Releasing tokens to a semaphore (releaseSemaphore).
  • Querying the semaphore for its current value (getSemaphoreValue).