package rpc_parallel

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

Module Make.ConnectionSource

Sourcetype t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval worker_id : t -> Id.t

The id of the connected worker

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

Run functions implemented by this worker

Sourceval run_exn : t -> f:(worker, 'query, 'response) Function.t -> arg:'query -> 'response Async.Deferred.t
Sourceval abort : t -> id:worker Function.Direct_pipe.Id.t -> unit

Can be used to abort a direct pipe function in progress.

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.

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

Innovation. Community. Security.