[grpc-io] Re: Is this a valid way to multi thread RPC handlers in gRPC async server in C++?

2021-12-02 Thread 'Christopher Warrington - MSFT' via grpc.io
On Sunday, November 14, 2021 at 9:59:34 PM UTC-8 Rajanarayana A wrote: > I see that there is a possibility of one instance of CallData being > accessed in multiple threads (returned as part of tag). Is CallData > thread-safe here or do we need to have a mutex for the same? There's an older thread

[grpc-io] Re: Is this a valid way to multi thread RPC handlers in gRPC async server in C++?

2021-12-01 Thread 'yas...@google.com' via grpc.io
Completion queues are thread-safe. CallData is an application-level construct. gRPC itself won't be accessing the internals of the struct. It just uses it as an opaque pointer. If the application level logic is such that CallData can be accessed from multiple threads, you would need to synchroni