StreamObserver is not thread safe, so if multiple threads are producing 
data, you must synchronize the calls. You can find more details here:
http://www.grpc.io/grpc-java/javadoc/io/grpc/stub/StreamObserver.html

Can you elaborate on your use and why multiple threads are writing on this 
streaming call, rather than having a call per thread?

On Friday, June 16, 2017 at 1:03:39 PM UTC-7, [email protected] wrote:
>
> Hi
> Are the Java steaming APIs thread safe ? 
> If I have a StreamingObserver.onNext(<mydata>) with potentially multiple 
> threads calling that
> then  on the StreamObserver's implemented interface onNext method how can 
> associate the response back to a specific 
>  thread's call to the StreamingObserver.onNext(<mydata>) ?
>
> Hope that made sense :)
>
> Thanks in advance.
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/2ce96119-ccb6-41fd-b52c-df7bae7a9ee3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to