package devkit

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

Module Devkit_core.MVarSource

Variable shared between threads

Sourcetype 'a t
Sourceval create : unit -> 'a t

Create

Sourceval set : 'a t -> 'a -> unit

Set the variable (overwriting previous value if any) and return immediately

Sourceval clear : 'a t -> unit

Unset the variable

Sourceval get : 'a t -> 'a

Get value (block until it is available)

Sourceval grab : 'a t -> 'a

Get value (block until it is available) and unset

Sourceval try_get : 'a t -> 'a option

Get value immediately without blocking

  • returns

    None if value was not set

Sourceval try_grab : 'a t -> 'a option

Grab value immediately without blocking

  • returns

    None if value was not set

OCaml

Innovation. Community. Security.