Hi, If using the callback API, you wouldn't need to create a separate thread for each RPC. The callbacks in the reactor would be automatically invoked by the threads managed by the gRPC library. That being said, if the reactor is going to be blocking for a substantial amount of time, you would want to perform that in a separate application thread, so that the library threads can focus on polling connections and executing callbacks.
Creating a different reactor object per RPC would be a very common way of doing things and should work fine. On Tuesday, September 7, 2021 at 2:22:47 PM UTC-7 [email protected] wrote: > Hello, could you possibly help me with creating async callback client? > Should I create UnaryClientReactor per rpc or I should run every rpc in > separate thread? > There cq-based async client example but callback client example looks like > sync rpc with thread blocking. > > 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/edeef857-31e9-442a-996d-f4b078e6813fn%40googlegroups.com.
