The gRPC streaming can be bi-directional and async. Is it thread safe?
Suppose that I have an RPC method with bi-directional streaming. Can I use one thread to read the stream, and another thread to write the stream simultaneously?
Thanks for the reply.
I only have one read thread and one write thread. Do I need to sync them to use the stream?
BTW, I am using c/c++. I am doing a small experiment, and seeing a crash at client side. Checked the code again, I guess likely because the stream I am using is ClientReaderWriter. Probably I should use ClientReader stream for read thread, and ClientWriter stream for write thread, is it right?