> Am I correct in assuming that I need to call my blocking application code in a new thread and pass the reactor (along with req/resp) to that new thread such that it can call reactor->Finish() once the work is done?
Yes, that's the most general recommendation, which you can find further down on that same gRFC you linked to: "One way of doing this is to push that code to a separate application-controlled thread." On Wednesday, November 23, 2022 at 9:10:10 AM UTC-8 sha...@jalloq.co.uk wrote: > Hi, > > I'm new to gRPC and am struggling to find examples of how to call > application code that blocks when using the callback API. > > I found the documentation here: > https://github.com/grpc/proposal/blob/master/L67-cpp-callback-api.md and > noted that it recommend that code in any reaction must not block. So for > an example of a simple unary reactor such as that in the > route_guide_callback_server.cc, what is the correct way of handing off to > your application code? > > Am I correct in assuming that I need to call my blocking application code > in a new thread and pass the reactor (along with req/resp) to that new > thread such that it can call reactor->Finish() once the work is done? > > Thanks, Shareef. > -- 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/033002b0-b926-464e-adc5-94a09a2f7d8cn%40googlegroups.com.