package picos

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

Source file promise.ml

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

type 'a t = 'a Computation.t

let of_value = Computation.returned
let await = Computation.await
let is_running = Computation.is_running

let try_terminate ?callstack t =
  let terminate_bt = Control.terminate_bt ?callstack () in
  Computation.try_cancel t terminate_bt

let terminate ?callstack t = try_terminate ?callstack t |> ignore
OCaml

Innovation. Community. Security.