package picos_std

  1. Overview
  2. Docs
Sample libraries for Picos

Install

Dune Dependency

Authors

Maintainers

Sources

picos-0.5.0.tbz
sha256=862d61383e2df93a876bedcffb1fd1ddc0f96c50b0e9c07943a2aee1f0e182be
sha512=87805379017ef4a7f2c11b954625a3757a0f1431bb9ba59132202de278b3e41adbe0cdc20e3ab23b7c9a8c5a15faeb7ec79348e7d80f2b14274b00df0893b8c0

doc/picos_std.sync/Picos_std_sync/Condition/index.html

Module Picos_std_sync.ConditionSource

A condition variable.

ℹ️ This intentionally mimics the interface of Stdlib.Condition. Unlike with the standard library condition variable, blocking on this condition variable allows an effects based scheduler to run other fibers on the thread.

Sourcetype t

Represents a condition variable.

Sourceval create : ?padded:bool -> unit -> t

create () return a new condition variable.

Sourceval wait : t -> Mutex.t -> unit

wait condition unlocks the mutex, waits for the condition, and locks the mutex before returning or raising due to the operation being canceled.

ℹ️ If the fiber has been canceled and propagation of cancelation is allowed, this may raise the cancelation exception.

Sourceval signal : t -> unit

signal condition wakes up one fiber waiting on the condition variable unless there are no such fibers.

Sourceval broadcast : t -> unit

broadcast condition wakes up all the fibers waiting on the condition variable.

OCaml

Innovation. Community. Security.