package saturn

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Spin exposes a formally lock-free interface as per the A lock-free relaxed concurrent queue for fast work distribution paper. Functions here busy-wait if the action cannot be completed (i.e. push on full queue, pop on empty queue).

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

push t x adds x to the tail of the queue. If the queue is full, push busy-waits until another thread removes an item.

val pop : 'a t -> 'a

pop t removes an item from the head of the queue. If the queue is empty, pop busy-waits until an item appear.

OCaml

Innovation. Community. Security.