package kcas

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

The type of backoff value

val create : ?max:int -> unit -> t

create ~max:maxv () returns a backoff value, which when waited upon, suspends the calling domain for x milliseconds, where x is the current value of the backoff. The backoff value x is doubled after every wait upto a maximum of maxv milliseconds. The default maximum is 32 milliseconds. The initial backoff is 1 millisecond.

val once : t -> unit

once b suspends the current domain for x milliseconds, where x is the current value of the backoff.

val reset : t -> unit

Resets the backoff clock to 1 millisecond.

OCaml

Innovation. Community. Security.