Got it, thank you. This may be an orthogonal question -- does the async API (polling for events on the completion queue) steal from the application's threads? In other words, is the gRPC runtime running in the background even in the async API? I have been using the async API under the assumption that the gRPC engine is not invoked (except for accepting new connection requests) until I call Next() or AsyncNext() on a completion queue.
On Wed, Oct 19, 2022 at 11:36 AM 'AJ Heller' via grpc.io < grpc-io@googlegroups.com> wrote: > That's fine. You can replace the Wait call with > `absl::SleepFor(absl::Seconds(42))` and it should work fine since the > callback API does not need to borrow threads from the application. At > shutdown, you'll still may want to wait on the gRPC server to finish doing > its job before exiting, but that's a separate matter. > On Wednesday, October 12, 2022 at 3:13:35 PM UTC-7 Rohit Zambre wrote: > >> Hi, >> >> Is it possible to use the callback API without calling server->Wait()? >> >> In the route_guide example, I see that route_guide_callback_sever.cc >> calls server->Wait(). In my use case, I cannot block on a call like Wait(). >> >> Regards, >> Rohit >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "grpc.io" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/grpc-io/hnQ60W6hPMA/unsubscribe. > To unsubscribe from this group and all its topics, 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/95ef746c-dd34-4a14-b7be-c10e9930e1can%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/95ef746c-dd34-4a14-b7be-c10e9930e1can%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAHDAghQO0%2BLMW%3DDhKXFtkhOJ55bf-EwcMhPReW%2B4jueXj6WEnQ%40mail.gmail.com.