From 96e6ed9c539cdaa2748355019e393c8ac7042732 Mon Sep 17 00:00:00 2001 From: ejona Date: Thu, 23 Oct 2014 19:50:03 -0700 Subject: [PATCH] Define threading requirements of StreamObserver ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=78404413 --- .../main/java/com/google/net/stubby/stub/StreamObserver.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stub/src/main/java/com/google/net/stubby/stub/StreamObserver.java b/stub/src/main/java/com/google/net/stubby/stub/StreamObserver.java index 8b8a38a063..0a71b5483b 100644 --- a/stub/src/main/java/com/google/net/stubby/stub/StreamObserver.java +++ b/stub/src/main/java/com/google/net/stubby/stub/StreamObserver.java @@ -2,6 +2,9 @@ package com.google.net.stubby.stub; /** * Receives notifications from an observable stream of messages. + * + *

Implementations are expected to be thread-compatible. Separate StreamObservers do not need to + * be sychronized together; incoming and outgoing directions are independent. */ // TODO(user): Consider whether we need to interact with flow-control at this layer. E.g. // public ListenableFuture onValue(V value). Do we layer it in here or as an additional