package picos_std

  1. Overview
  2. Docs
Sample libraries for Picos

Install

Dune Dependency

Authors

Maintainers

Sources

picos-0.6.0.tbz
sha256=3f5a08199cf65c2dae2f7d68f3877178f1da8eabf5376e15114e5a8958087dfa
sha512=ad24910c47ce614268c4268874bb918da7f8b5f03b3ad706bbf30323635262e94ddab6be24eaebbca706bfa82c0a517d4272b396459e020c185942125c9bdb7b

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.