package picos

  1. Overview
  2. Docs
Pico scheduler interface

Install

Dune Dependency

Authors

Maintainers

Sources

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

doc/picos.thread/Picos_thread/TLS/index.html

Module Picos_thread.TLSSource

Thread-local storage.

Note that here "thread" refers to system level threads rather than fibers or domains. In case a system level thread implementation, i.e. the threads.posix library, is not available, this will use Picos_domain.DLS.

Sourcetype 'a t

Represents a key for associating values with threads.

Sourceval create : unit -> 'a t

create () allocates a new key for associating values with threads.

⚠️ Keys should not be created dynamically as each key will potentially increase the space taken by every thread.

Sourceexception Not_set

Exception raised by get_exn when no value is associated with the specified key for the current thread.

Sourceval get_exn : 'a t -> 'a

get_exn key returns the value associated with the specified key for the current thread or raises Not_set in case no value has been set for the key.

⚠️ The Not_set exception is raised with no backtrace. Always catch the exception unless it is known that a value has been set.

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

set key value associates the value with the specified key for the current thread.

OCaml

Innovation. Community. Security.