Skip to content

Commit

Permalink
stub: Document StreamObserver is an async API
Browse files Browse the repository at this point in the history
Missing docs were brought up in grpc#8423
  • Loading branch information
ejona86 committed Aug 25, 2021
1 parent 8a5694b commit 7f9970e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stub/src/main/java/io/grpc/stub/StreamObserver.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
* not need to be synchronized together; incoming and outgoing directions are independent.
* Since individual {@code StreamObserver}s are not thread-safe, if multiple threads will be
* writing to a {@code StreamObserver} concurrently, the application must synchronize calls.
*
* <p>This API is asynchronous, so methods may return before the operation completes. gRPC
* guarantees it does not block on I/O in its implementation, but applications are allowed to
* perform blocking operations in their implementations. However, doing so will delay other
* callbacks because the methods cannot be called concurrently.
*/
public interface StreamObserver<V> {
/**
Expand Down

0 comments on commit 7f9970e

Please sign in to comment.