package tezos-workers

  1. Overview
  2. Docs

The following interface are common elements of multiple modules below. They are used to minimize repetition.

type t

With BOXes, you can put a request right at the front

val put_request : t -> ('a, 'request_error) Request.t -> unit

put_request worker request sends the request to the worker. If the worker dropbox is closed, then it is a no-op.

val put_request_and_wait : t -> ('a, 'request_error) Request.t -> ('a, 'request_error message_error) result Lwt.t

put_request_and_wait worker request sends the request to the worker and waits for its completion. If the worker dropbox is closed, then it returns Error Closed.