package lockfree

  1. Overview
  2. Docs

Non_lockfree exposes an interface that contains non-lockfree paths, i.e. threads may need to cooperate to terminate. It is often more practical than Spin, in particular when using a fair OS scheduler.

val push : 'a t -> 'a -> bool

push t x adds x to the tail of the queue. Returns false if t is currently full.

val pop : 'a t -> 'a option

pop t removes the head item from t and returns it. Returns None if t is currently empty.

module CAS_interface : sig ... end

Alternative interface, which may perform better on architectures without FAD instructions (e.g. AArch).

OCaml

Innovation. Community. Security.