Hi there,
Sorry, what you're looking for is not supported by any current or planned 
gRPC APIs for C++.   Our completion queue is actually based on a pretty 
complex polling mechanism to enable multiple threads to poll on different 
FDs in the general case; it uses either poll, epoll, or iocp depending on 
the platform and number of open FDs. We don't have any way of integrating 
our completion queue polling with any other event processing mechanism - 
either using the application's polling mechanism to drive the CQ or using 
gRPC's polling mechanism (src/core/iomgr) to activate application FDs. I 
can only suggest using a separate thread for application-level select or 
perhaps using a single thread that alternates 0 timeout select with 0 
timeout gRPC AsyncNext calls.

Best regards,
Vijay

On Wednesday, September 21, 2016 at 10:03:38 AM UTC-7, rkr...@gmail.com 
wrote:
>
>
> What's the easiest way of making a gRPC server that can run 
> single-threaded in cooperation with other file-descriptor based operations? 
> What I plan is a single threaded server that waits on available data on any 
> number of file descriptors via select(), one of the file descriptors 
> corresponding to the socket that I'm serving gRPC requests on.
>
> I looked at the async hello world sample, but am unsure as to whether or 
> not I can just call the HandleRpcs() member function whenever my select() 
> pops...
>
> I'm assuming (and thus looking for confirmation :-)) that this would also 
> work with stream messages on the server? (I.e., more data is available, the 
> select() pops, I call HandleRpcs() to dispose of the additional data, and 
> everything is right with the world?)
>
> Thanks in advance!
>
> Cheers,
> -RK
>

-- 
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/b68e6993-4c4d-4f5e-b7bf-97eab6b8259a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to