Hi,

I have tryed to prototype some examples with two types of async API, and I 
saw some differences. It's just for client-side.

1. When I use CQ:
I'm creating new thread to getting new tags from CQ in a loop (with 
AsyncNext). In main thread I'm calling methods which creates responders and 
runs async RPCs. So all of RPCs run asynchronously and I can see mixed 
output in my terminal.

2. When I use callbacks:
Each RPCs run asynchronously (with stub_->async()->), but whole programm is 
still synchronously and every next RPC should wait before previos will 
finish. So in my terminal I see consistently output.

For me, callbacks API looks much easier to understanding and I want to use 
it.
So, should I use something like std::future / std::async to get behaviour 
like CQ but with callbacks? Is it correct use case?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/68ace9b6-d56d-4640-9169-324d3d167b6cn%40googlegroups.com.

Reply via email to