gRPC C++

187 views
Skip to first unread message

pavel...@gmail.com

unread,
Mar 3, 2016, 10:51:00 AM3/3/16
to grpc.io
Hi.

1. Are there any plans in the C ++ implementation of the client as well as in Object-C, with the callback function to its asynchronous call when receiving a response from the server ?

Vijay Pai

unread,
Mar 3, 2016, 12:08:25 PM3/3/16
to pavel...@gmail.com, grpc.io
The C++ async API is based on receiving events through a completion queue rather than having direct callbacks from the notification manager. This was an intentional design decision to make sure that the application layer has full control over its own thread usage and to prevent malformed callbacks from blocking notification processing by the library. As a result, there are currently no plans to provide a callback interface to the C++ async client.

You can emulate this behavior if you like by having a thread continuously calling Next (or AsyncNext) and then have it invoke the callbacks associated with the active tags (or have it pass that information to a threadpool that would do that). That's actually likely to be the most common use of the async API on the client side, IMO.


On Thu, Mar 3, 2016 at 7:51 AM <pavel...@gmail.com> wrote:
Hi.

1. Are there any plans in the C ++ implementation of the client as well as in Object-C, with the callback function to its asynchronous call when receiving a response from the server ?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/56968459-21ec-4215-9cc2-170211d2f142%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pavel...@gmail.com

unread,
Mar 4, 2016, 8:04:07 AM3/4/16
to grpc.io
Thanks for the quick response.

About Next (or AsyncNext) I know. I will use them


четверг, 3 марта 2016 г., 20:08:25 UTC+3 пользователь Vijay Pai написал:
Reply all
Reply to author
Forward
0 new messages