Function mz_dataflow_types::client::replicated::spawn_client_task
source · [−]pub fn spawn_client_task<C: Send + 'static, R: Send + 'static, Client: GenericClient<C, R> + 'static, Name: AsRef<str>, NameClosure: FnOnce() -> Name>(
client: Client,
nc: NameClosure
) -> (UnboundedSender<C>, UnboundedReceiver<Result<R, Error>>)
Expand description
Spawns a task that repeatedly sends messages back and forth between a client and its owner, and return channels to communicate with it.
This can be useful because sending to an mpsc
is synchronous, eliminating
cancelation-unsafety in some cases.
For this to be useful, Client::recv
must itself be cancelation-safe.