package picos_std

  1. Overview
  2. Docs
Sample libraries for Picos

Install

Dune Dependency

Authors

Maintainers

Sources

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

doc/src/picos_std.structured/flock.ml.html

Source file flock.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
open Picos

let get () = Bundle.get_flock (Fiber.current ())

let terminate_after ?callstack ~seconds () =
  Bundle.terminate_after ?callstack (get ()) ~seconds

let terminate ?callstack () = Bundle.terminate ?callstack (get ())
let error ?callstack exn_bt = Bundle.error (get ()) ?callstack exn_bt
let fork_as_promise thunk = Bundle.fork_as_promise_pass (get ()) thunk FLS
let fork action = Bundle.fork_pass (get ()) action FLS

let join_after ?callstack ?on_return fn =
  Bundle.join_after_pass ?callstack ?on_return fn Bundle.FLS
OCaml

Innovation. Community. Security.