async fn forward_messages<C, T>(
client: C,
rx: UnboundedReceiver<ComputeCommand<T>>,
tx: UnboundedSender<Result<ComputeResponse<T>, Error>>,
)where
C: ComputeClient<T>,
Expand description
Forward messages between a pair of channels and a ComputeClient
.
This functions is run in its own task and exists to allow SequentialHydration::recv
to be
cancel safe even though it needs to send commands to the wrapped client, which isn’t cancel
safe.