In the greeter example provided in the GitHub repo, we see this line: (
https://github.com/grpc/grpc/blob/v1.24.0/examples/cpp/helloworld/greeter_async_server.cc
)

responder_.Finish(reply_, Status::OK, this);

Because of the "this" pointer argument, cq_.Next() triggers the event and 
we clear the CallData object inside in the "FINISH" state as per the 
example provided.

I tried to use "*AsyncNotifyWhenDone*" just before RequestsayHello():

ctx_.*AsyncNotifyWhenDone*((void*)(*extFunction*)) where *extFunction *is 
some random function declared in the file. I found that, cq_.Next() 
triggered a new event with tag value equal to the extFunction address. 

So, we get two events now, one because of the Finish call and the other due 
to the AsyncNotifyWhenDone() call. I want to ask, what could be a use of 
using AsyncNotifyWhenDone
? I could not find any special requirements apart from deleting the 
CallData instance.

If I am wrong in part of the question. Please correct me.
Thank you! 
 
 

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/6a97c082-7541-42e1-b843-13ce04c0c617%40googlegroups.com.

Reply via email to