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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
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/a9c0b22a-bd1d-4463-bcbb-58e3a55c393b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to