C++ Client Async write after read

176 views
Skip to first unread message

Trending Now

unread,
Mar 11, 2022, 1:17:04 PM3/11/22
to grpc.io

Hello,

I'm coding a bidirectional rpc using grpc. I'm using the asynchronous API.

The idea is to write the msg to the grpc::ClientAsyncReaderWriter< W, R > stream and then call the Read in while loop till getting a false status

If I write to the stream, the program will simply crash. The reason is the asynchronous API allows only “1 outstanding asynchronous write on the same side of the same stream without waiting for the completion queue notification“.

Is there a way to force/prioritize the write operation after making a read operation ?

Thank you very much

Trending Now

unread,
Mar 12, 2022, 5:55:28 AM3/12/22
to grpc.io
Hello

Any update please.
sorry, it's blocking for me :(

Thank you very much !

Trending Now

unread,
Mar 13, 2022, 5:06:36 PM3/13/22
to grpc.io
Any update please ?

yas...@google.com

unread,
May 31, 2023, 9:50:48 PM5/31/23
to grpc.io
Sorry for the late response. This fell through the cracks.

It's fine to have a read and a write active at the same time. It's only problematic to multiple reads or multiple writes at the same time.

Reply all
Reply to author
Forward
0 new messages