package ocaml-compiler

Build not yet checked
  1. Overview
  2. Docs

doc/stdlib/Stdlib/Atomic/Array/index.html

Module Atomic.ArraySource

A bare-bones submodule of atomic arrays.

  • since 5.6
Sourcetype !'a t
Sourceval make : int -> 'a -> 'a t
Sourceval init : int -> (int -> 'a) -> 'a t
Sourceval length : 'a t -> int

The API below mirrors the API to access atomic references, see the documentation above for more information.

Sourceval unsafe_get : 'a t -> int -> 'a
Sourceval get : 'a t -> int -> 'a
Sourceval unsafe_set : 'a t -> int -> 'a -> unit
Sourceval set : 'a t -> int -> 'a -> unit
Sourceval unsafe_exchange : 'a t -> int -> 'a -> 'a
Sourceval exchange : 'a t -> int -> 'a -> 'a
Sourceval unsafe_compare_and_set : 'a t -> int -> 'a -> 'a -> bool
Sourceval compare_and_set : 'a t -> int -> 'a -> 'a -> bool
Sourceval unsafe_fetch_and_add : int t -> int -> int -> int
Sourceval fetch_and_add : int t -> int -> int -> int
Sourceval unsafe_update : ('a -> 'a) -> 'a t -> int -> unit
Sourceval update : ('a -> 'a) -> 'a t -> int -> unit