Is StartWrite() allowed outside OnWriteDone() in gRPC C++ server callback API?
In the gRPC C++ ServerBidiReactor callback API, is it allowed and safe to call StartWrite() from a thread that is not part of a gRPC reaction — for example, outside of OnWriteDone()?
The documentation clarifies that OnWriteDone() may run concurrently with other reactions, but it doesn’t clearly say whether StartWrite() is valid when issued from application threads.
Is it officially supported to call StartWrite() from outside the reaction flow (e.g., via an app-managed thread or queue), as long as we ensure at most one write is active and we synchronize shared state?
Would appreciate a definitive answer or pointer from the gRPC maintainers.
Tag : @markdroth
Read more here: Source link
