Hi Sumant, Unfortunately, the answer to the previous email thread you mentioned (i.e https://groups.google.com/forum/#!topic/grpc-io/NrrPOKEZbAU ) is still relevant.
There is currently no way to do that although in theory it should be possible to (by exposing the low-level/internal completion queue APIs i.e grpc_cq_begin_op() <https://github.com/grpc/grpc/blob/v1.18.0/src/core/lib/surface/completion_queue.h#L74> and grpc_cq_end_op() <https://github.com/grpc/grpc/blob/v1.18.0/src/core/lib/surface/completion_queue.h#L78> APIs via C++ wrappers). There isn't a way to signal a condition variable either If possible, do create a ticket so that the team can triage it. -Sree On Wednesday, February 6, 2019 at 5:00:50 PM UTC-8, [email protected] wrote: > > Hi folks, > > I'm wondering if there's a way in grpc::CompletionQueue to insert events > dequeued from a non-grpc job queue? > > I've two queues in my server: one grpc::CompleteQueue and another > unrelated internal queue. Currently, I'm polling both queues in the same > thread for availability of an event. It sort of busy loops. I would like to > have one stop for all event multiplexing. If there is a way to insert an > event into a grpc_completion_queue (with some tag) and retrieve it back out > from cq_.AsynNext, that would do the trick. Effectively, use > gprc_completion_queue as a pipe. Is this possible? > > A very similar question was discussed here: > https://groups.google.com/forum/#!topic/grpc-io/NrrPOKEZbAU Looks like > back in 2016 no such way existed. > > Alternatively, is there a way to notify a condition_variable upon > availability of an event in the grpc_completion_queue? The polling thread > would block simply block on the condition_variable and will subsequently > call cq.AsyncNext with zero timeout. > > Regards, > Sumant > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d38eac53-c71e-4d00-b3ee-300719ead390%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
