--
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 grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/1024fc7e-678f-45fd-a2ba-29cb3c118fff%40googlegroups.com.
StreamObservers are not thread-safe, if multiple threads will be writing to a StreamObserver concurrently, the application must synchronize calls"No, they are not serialized. You need to do that by yourself. Otherwise you might encounter strange behaviour. I opened an issue once because I stumbled upon the same problem: https://github.com/grpc/grpc-java/issues/6323
Also see https://github.com/grpc/grpc-java/blob/master/stub/src/main/java/io/grpc/stub/StreamObserver.java#L32
Cheers,
Chris.
On 29.04.20 23:44, enat...@gmail.com wrote:
Is it the case that (in the Java bindings), the gRPC framework will serialize invocations to the StreamObserver used to process incoming client requests (e.g., onNext, onError, onCompleted)? I.e. they will never be invoked concurrently.--
I looked around before I asked but couldn't find the answer.
Would appreciate any help!
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 grp...@googlegroups.com.
Interesting - thank you very much! I did see this in the StreamObserver doc:"Since individualStreamObservers are not thread-safe, if multiple threads will be writing to aStreamObserverconcurrently, the application must synchronize calls"
--
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 grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oP6TD79r_0dUEjk1DeqZ-n9SHtQoW0eJwKFPfAwr%2BuMYQ%40mail.gmail.com.