aboutsummaryrefslogtreecommitdiff
path: root/stub
diff options
context:
space:
mode:
authorCarl Mastrangelo <notcarl@google.com>2018-06-26 15:43:13 -0700
committerGitHub <noreply@github.com>2018-06-26 15:43:13 -0700
commit7edb41a4ef78cf691e08d16b41d61da1f8ef3850 (patch)
tree22011a849b994ee5b5f3275ec894b4044075ee10 /stub
parent81da3eb95be37fa0647ce8da2e19de96ab84c600 (diff)
downloadgrpc-grpc-java-7edb41a4ef78cf691e08d16b41d61da1f8ef3850.tar.gz
stub: clarify StreamObservers interaction
Diffstat (limited to 'stub')
-rw-r--r--stub/src/main/java/io/grpc/stub/StreamObservers.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/stub/src/main/java/io/grpc/stub/StreamObservers.java b/stub/src/main/java/io/grpc/stub/StreamObservers.java
index 1133c147f..5477b555b 100644
--- a/stub/src/main/java/io/grpc/stub/StreamObservers.java
+++ b/stub/src/main/java/io/grpc/stub/StreamObservers.java
@@ -28,7 +28,8 @@ import java.util.Iterator;
public final class StreamObservers {
/**
* Copy the values of an {@link Iterator} to the target {@link CallStreamObserver} while properly
- * accounting for outbound flow-control.
+ * accounting for outbound flow-control. After calling this method, {@code target} should no
+ * longer be used.
*
* <p>For clients this method is safe to call inside {@link ClientResponseObserver#beforeStart},
* on servers it is safe to call inside the service method implementation.
@@ -59,7 +60,8 @@ public final class StreamObservers {
/**
* Copy the values of an {@link Iterable} to the target {@link CallStreamObserver} while properly
- * accounting for outbound flow-control.
+ * accounting for outbound flow-control. After calling this method, {@code target} should no
+ * longer be used.
*
* <p>For clients this method is safe to call inside {@link ClientResponseObserver#beforeStart},
* on servers it is safe to call inside the service method implementation.