package picos_lwt

  1. Overview
  2. Docs
Lwt interface for Picos

Install

Dune Dependency

Authors

Maintainers

Sources

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

doc/picos_lwt.unix/Picos_lwt_unix/index.html

Module Picos_lwt_unixSource

Direct style Picos compatible interface to Lwt with Lwt_unix for OCaml 5.

Sourceval run_fiber : Picos.Fiber.t -> (Picos.Fiber.t -> unit) -> unit Lwt.t

run_fiber fiber main runs the main program as the specified fiber as a promise with Lwt as the scheduler using a Lwt_unix based System module. In other words, the main program will be run as a Lwt promise or fiber.

⚠️ This may only be called on the main thread on which Lwt runs.

Sourceval run : ?forbid:bool -> (unit -> 'a) -> 'a Lwt.t

run main is equivalent to calling run_fiber with a freshly created fiber and main wrapped to capture the result of main.

The optional forbid argument defaults to false and determines whether propagation of cancelation is initially allowed.

Sourceval run_main : ?forbid:bool -> (unit -> 'a) -> 'a

run_main main is equivalent to Lwt_main.run (run main).

OCaml

Innovation. Community. Security.