CallData* cd = NULL; bool ok = false; while( cq->Next(reinterpret_cast<void**>(&cd), &ok) ) { if( ok ) { cd->Proceed(); } else {
// what to do here?
}
}--
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+u...@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/87b2b09a-c825-4ea6-ae3a-ffcecec5b1eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello there,Thanks for the detailed question and feedback! The ok parameter indicates whether or not the operation completed "normally". When it is false, it means that no more operations on that side of the RPC (Read-side or Write-side) will ever return true in the future (e.g., a server Read will never return true again after the client has done a WritesDone). In some cases, it might mean that operations on both sides of the RPC will never return true in the future (e.g., if the RPC was cancelled or had its deadline exceeded). The way to handle it will typically be to mark some information in your class to indicate that type of progress has occurred. That said, the only conclusive way of knowing the RPC status is with a call to Finish. The ok parameter just tells you explicitly about one side of the RPC.- Vijay
On Mon, Jan 16, 2017 at 12:47 AM <zhang...@gmail.com> wrote:
--CallData* cd = NULL;bool ok = false;while( cq->Next(reinterpret_cast<void**>(&cd), &ok) ) {if( ok ) {cd->Proceed();} else {
// what to do here?
}}
In my grpc server, I found the 2nd parameter of ServerCompletionQueue::Next sometimes returns false.If I do nothing in this case, CallData exhaust after a while and the program hang at the 3rd line (the start of the while loop).but from the examples, I didn't find a correct way to handle this.Is there an example for this, thanks.
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/87b2b09a-c825-4ea6-ae3a-ffcecec5b1eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/CADEy0h0oJTQpAw_zxEoCHnY0_CqUk%2B-8CGLg0ngvh6%3Dwf5r9QQ%40mail.gmail.com.