package rpc_parallel

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

Module Parallel.FunctionSource

Sourcetype ('worker, 'query, +'response) t
Sourcemodule Direct_pipe : sig ... end
Sourceval map : ('worker, 'query, 'a) t -> f:('a -> 'b) -> ('worker, 'query, 'b) t
Sourceval contra_map : ('worker, 'a, 'response) t -> f:('b -> 'a) -> ('worker, 'b, 'response) t

Common functions that are implemented by all workers

Sourceval async_log : (_, unit, Async.Log.Message.Stable.V2.t Async.Pipe.Reader.t) t

This implementation will add another Log.Output for Log.Global that transfers log messages to the returned pipe. You can subscribe to a worker's log more than once and from different processes, as each call simply adds a new Log.Output. Closing the pipe will remove the corresponding Log.Output.

NOTE: You will never get any log messages before this implementation has run (there is no queuing of log messages). As a consequence, you will never get any log messages written in a worker's init functions.

Sourceval close_server : (_, unit, unit) t

A given process can have multiple worker servers running (of the same or different worker types). This implementation closes the server on which it is run. All existing open connections will remain open, but no further connections to this worker server will be accepted.

NOTE: calling close_server on a worker process that is only running one worker server will leave a stranded worker process if no other cleanup has been setup (e.g. setting up on_client_disconnect or Connection.close_finished handlers)

Sourcemodule For_internal_testing : sig ... end
OCaml

Innovation. Community. Security.