about Read/Write on ServerAsyncReaderWriter

34 views
Skip to first unread message

song...@hotmail.com

unread,
Jan 25, 2017, 9:25:42 PM1/25/17
to grpc.io
I know that the read/write using ServerAsyncReaderWriter is async. After calling the write API, the actual writing op is done when the cq (write) event is notified. My question is that before the cq (write) event is notified, does it allow to write another message? I see it crashes in my program, got error below. Does this mean we have to serialize the write operations?

E0125 18:15:03.665376213   12789 server.cc:485]              assertion failed: GRPC_CALL_OK == result

Sree Kuchibhotla

unread,
Jan 26, 2017, 12:36:28 PM1/26/17
to song...@hotmail.com, grpc.io
Hi, 

>> My question is that before the cq (write) event is notified, does it allow to write another message? I

As you correctly noticed, a second write is not allowed until you do a cq->next() and make sure that the first write is done (the tag for the first write operation is returned from the completion queue).


-Sree

On Wed, Jan 25, 2017 at 6:25 PM, <song...@hotmail.com> wrote:
I know that the read/write using ServerAsyncReaderWriter is async. After calling the write API, the actual writing op is done when the cq (write) event is notified. My question is that before the cq (write) event is notified, does it allow to write another message? I see it crashes in my program, got error below. Does this mean we have to serialize the write operations?

E0125 18:15:03.665376213   12789 server.cc:485]              assertion failed: GRPC_CALL_OK == result

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/4e176a73-b52b-4843-b666-46c3fdfae199%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages