package moonpool

  1. Overview
  2. Docs

Atomic values.

This is either a shim using ref, on pre-OCaml 5, or the standard Atomic module on OCaml 5.

include module type of struct include Stdlib.Atomic end
type !'a t = 'a Stdlib__Atomic.t
val make : 'a -> 'a t
val get : 'a t -> 'a
val set : 'a t -> 'a -> unit
val exchange : 'a t -> 'a -> 'a
val compare_and_set : 'a t -> 'a -> 'a -> bool
val fetch_and_add : int t -> int -> int
val incr : int t -> unit
val decr : int t -> unit
OCaml

Innovation. Community. Security.