package rpc_parallel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val worker_id : t -> Id.t

The id of the connected worker

val run : t -> f:(worker, 'query, 'response) Function.t -> arg:'query -> 'response Core.Or_error.t Async.Deferred.t

Run functions implemented by this worker

val run_exn : t -> f:(worker, 'query, 'response) Function.t -> arg:'query -> 'response Async.Deferred.t

Connect to a given worker, returning a type wrapped Rpc.Connection.t that can be used to run functions.

with_client worker init_arg f connects to the worker's server, initializes the connection state with init_arg and runs f until an exception is thrown or until the returned Deferred is determined.

NOTE: You should be careful when using this with Pipe_rpc. See Rpc.Connection.with_close for more information.

val close : t -> unit Async.Deferred.t
val close_finished : t -> unit Async.Deferred.t
val close_reason : t -> on_close:[ `started | `finished ] -> Core.Info.t Async.Deferred.t
val is_closed : t -> bool
OCaml

Innovation. Community. Security.