Re: [grpc-io] Re: [C++] CompletionQueue::Next() return vs ok parameter value

2017-09-05 Thread 谭锦彪
I agree with you, but it really happend, and in high frequency, maybe it's a bug? It's a unary RPC. 在 2017年9月6日星期三 UTC+8上午12:26:14,Mark D. Roth写道: > > If the tag being returned from the completion queue is the result of a > Finish() call, then I think ok should always be true, even if the

Re: [grpc-io] Re: [C++] CompletionQueue::Next() return vs ok parameter value

2017-09-03 Thread 谭锦彪
Hi Roth, Thanks for your reply, about the refer to tag, you can see greeter_async_client2.cpp, my client code is just like it, but the server code has complex work to do. Sometimes, ok is false but call->status.ok() is true, and call->reply.message() is right. That happens very frequent in my

Re: [grpc-io] Re: [C++] CompletionQueue::Next() return vs ok parameter value

2017-09-01 Thread 'Mark D. Roth' via grpc.io
I'm not sure what you mean when you refer to tag->status and tag->reply. The gRPC API does not define a particular API for the tag; that's entirely up to your application code, so I have no idea what those fields represent or how they are being set. Yang's earlier description is correct: the ok

[grpc-io] Re: [C++] CompletionQueue::Next() return vs ok parameter value

2017-09-01 Thread 谭锦彪
Hi I meet the situation that the Next return true, but ok==false, howerer, the content of the tag is right, tag->status.ok() return true, tag->reply is right too, That confuse me, why would this situation happen? Could I ignore the check of ok? 在 2017年8月2日星期三 UTC+8上午6:57:16,Yang Gao写道: > >

[grpc-io] Re: [C++] CompletionQueue::Next() return vs ok parameter value

2017-08-01 Thread 'Yang Gao' via grpc.io
Usually we have a loop calling Next and when we are sure there will be no more work adding to the completion queue we call completion queue's Shutdown method to shutdown the queue. It will in turn cause the Next to return false and it can be used to break out of the loop. The ok parameter is