package octez-internal-libs

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

Module Async.UnixSource

Basic abstraction for a worker.

Sourcetype t

A task

Sourcetype outcome = [
  1. | `Success
  2. | `Cancelled
  3. | `Failure of string
]
Sourceval outcome_t : outcome Irmin.Type.t
Sourcetype status = [
  1. | outcome
  2. | `Running
]
Sourceval status_t : status Irmin.Type.t
Sourceval async : (unit -> unit) -> t

Start a task.

Sourceval await : t -> [> outcome ] Lwt.t

If running, wait for a task to finish and return its outcome.

If not running, return the oucome of the task.

Sourceval status : t -> [> status ]

If running, refresh the status of the task, without blocking.

If not running, return the oucome of the task.

Sourceval cancel : t -> bool

If running, cancel the task and return true.

If not running, do nothing and return false.

OCaml

Innovation. Community. Security.