val spawn_and_connect : (?umask:int ‑> redirect_stdout:Rpc_parallel__.Fd_redirection.t ‑> redirect_stderr:Rpc_parallel__.Fd_redirection.t ‑> connection_state_init_arg:connection_state_init_arg ‑> worker_state_init_arg ‑> (t * Connection.t) Core.Or_error.t Async.Deferred.t) with_spawn_args
This is nearly identical to calling spawn ~shutdown_on:Heartbeater_timeout
and
then Connection.client
. The only difference is that this function handles
shutting down the worker when Connection.client
returns an error.
Uses of spawn_and_connect
that disregard t
can likely be replaced with spawn
~shutdown_on:Disconnect
. If t
is used for reconnecting, then you can use spawn
followed by Connection.client
.
val spawn_and_connect_exn : (?umask:int ‑> redirect_stdout:Rpc_parallel__.Fd_redirection.t ‑> redirect_stderr:Rpc_parallel__.Fd_redirection.t ‑> connection_state_init_arg:connection_state_init_arg ‑> worker_state_init_arg ‑> (t * Connection.t) Async.Deferred.t) with_spawn_args