The idea is that there are a bunch of threads that gRPC maintains for the execution of callbacks. The same threads can also be used for operations that gRPC needs to perform like polling, reading and writing.
You would find detailed information on the callback API through the following links - * https://github.com/grpc/proposal/blob/master/L67-cpp-callback-api.md * https://github.com/grpc/proposal/blob/master/L68-core-callback-api.md * https://grpc.io/docs/languages/cpp/callback/ * https://grpc.io/docs/languages/cpp/best_practices/ On Thursday, October 24, 2024 at 7:30:18 AM UTC-7 Alex Drastico wrote: > Hi, > we are evaluating gRPC for our new microservices and would like some > clarifications about the C++ (asynch) callback API. > > The docs suggest that "reactions should be fast", which generally is > indication of single threaded execution and therefore avoid heavy > processing as that would be blocking the main thread. But then it also says > that "reactions can run in parallel", which seems to suggest they are > executed concurrently. So we have the following questions: > > 1. Does gRPC's reactor pattern implementation in C++ use a single thread > to execute the reactions or are the reactors being executed in dedicated > "worker" threads? > > 2. Can someone provide a brief description of how the reactor pattern is > implemented in the C++ API? Or point to some relevant docs as we were not > able to find much info in this regard. > > 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+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/grpc-io/df9b7515-aed0-4e93-bc45-226c15a67b45n%40googlegroups.com.