package picos

  1. Overview
  2. Docs
Pico scheduler framework

Install

Dune Dependency

Authors

Maintainers

Sources

picos-0.3.0.tbz
sha256=544804c0bde4b29764f82f04e7defed7c06bc43e5a6ce3f7fdc326cb54a7f066
sha512=4c93427e477fb52374a554a8b9c4c92836a9b5899161275d1473269ab526a1f59177209140631ed763a55be375855dea12f076e18bf4124522414986c0e257be

doc/picos.structured/Picos_structured/Bundle/index.html

Module Picos_structured.BundleSource

A dynamic bundle of fibers guaranteed to be joined at the end.

Sourcetype t

Represents a bundle of fibers.

Sourceval join_after : (t -> 'a) -> 'a

join_after scope calls scope with a bundle. A call of join_after returns or raises only after scope has returned or raised and all forked fibers have terminated. If scope raises an exception, error will be called.

ℹ️ When scope returns normally, terminate will not be called implicitly.

Sourceval terminate : ?callstack:int -> t -> unit

terminate bundle cancels all the forked fibers using the Terminate exception.

The optional callstack argument specifies the number of callstack entries to capture with the Terminate exception. The default is 0.

Sourceval error : t -> Picos.Exn_bt.t -> unit

error bundle exn_bt first calls terminate and then adds the exception with backtrace to the list of exceptions to be raised, unless the exception is the Terminate exception, which is not considered to signal an error by itself.

Sourceval fork : t -> (unit -> unit) -> unit

fork bundle action spawns a new fiber to the bundle that will run the given action. If the action raises an exception, error will be called with that exception.

OCaml

Innovation. Community. Security.