If I want to add more threads that process server communication can it be done by:
// run rpc handlers pool
for (int i = 0; i < threadsNo; i++) {
thread t(HandleRpcs, service, cq);
t.detach();
}
?
One CompletionQueue shared by multiple read/write threads
--
regards
Przemysław Sobala
Vijay Pai
unread,
May 25, 2017, 12:05:22 PM5/25/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grpc.io
Yes, you can have 1 cq shared by multiple threads; that is no problem. CQ operations are all thread-safe so you don't need additional locks just to use the cq.