It seems that the following code blocks until the first streamed object arrives:
let mut stream = client
.stream_something(StreamRequest {})
.await
.unwrap()
.into_inner();
Specifically I want to start the stream, and then send other RPCs that may trigger a state change that sends a message on the stream.
But I can't start the stream first, because that can block forever. And I don't want to send the other RPC first, because then I may miss the streamed update triggered by my other RPC.
I hope that I don't have to resort to wrapping the whole thing, and provide a new interface such as mpsc
.