HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Package0.1.2.4ConcurrencyDataData Structures

atomic-counter

Mutable counters that can be modified with atomic operatinos

Modules

4 modules

Description

This package defines Counter type that can be safely modified concurrently from multiple threads. The type supports only few operations, namely read, write, cas (compare and swap), add, subtract and a few bitwise ones like or, and xor.

Most common use case is having a shared counter that multiple threads increment. Another potential use case is lightweight locks.

Depends on

1 package

Used by in this set · 1