There can only be one outstanding read or write at a given time on a given 
stream, but reads and writes can happen in parallel.  So you're guaranteed 
that no more than one thread will be in OnReadDone() at once, and no more 
than one thread will be in OnWriteDone() at once, but you could have one 
thread in OnReadDone() while another thread is in OnWriteDone().

OnDone() will not be invoked until after all of the other reaction methods 
are complete.

On Monday, August 9, 2021 at 6:18:38 AM UTC-7 [email protected] wrote:

> Is Callback api thread safe?
> Should I use mutex in onReadDone/onWriteDone/onDone or they are thread 
> safe on grpc level?
> Thank you.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/f4354efd-b154-4fd0-b3ff-49858d1b0dfen%40googlegroups.com.

Reply via email to