aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/RxLibrary/GRXForwardingWriter.h
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-08-08 23:25:04 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-08-08 23:25:04 -0700
commit7a75936001478a0f7ea7eaf204c1b19bd55190f9 (patch)
tree2f7c8065b4ff9ef6c9b2f5d8c6c3e8271454f3bc /src/objective-c/RxLibrary/GRXForwardingWriter.h
parentc29812fc2c9285046a886a0c3a29127679c4b02b (diff)
parent578ab166adc49f3d8c1fccdb1f5a364e7011c8ec (diff)
Merge pull request #2861 from jcanizales/fix-race-condition
Fix race condition in GRPCCall
Diffstat (limited to 'src/objective-c/RxLibrary/GRXForwardingWriter.h')
-rw-r--r--src/objective-c/RxLibrary/GRXForwardingWriter.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/objective-c/RxLibrary/GRXForwardingWriter.h b/src/objective-c/RxLibrary/GRXForwardingWriter.h
index d004333d2b..f310832284 100644
--- a/src/objective-c/RxLibrary/GRXForwardingWriter.h
+++ b/src/objective-c/RxLibrary/GRXForwardingWriter.h
@@ -33,11 +33,17 @@
#import "GRXWriter.h"
-// A "proxy" class that simply forwards values, completion, and errors from its
-// input writer to its writeable.
+// A "proxy" class that simply forwards values, completion, and errors from its input writer to its
+// writeable.
// It is useful as a superclass for pipes that act as a transformation of their
// input writer, and for classes that represent objects with input and
// output sequences of values, like an RPC.
+//
+// Thread-safety:
+// All messages sent to this object need to be serialized. When it is started, the writer it wraps
+// is started in the same thread. Manual state changes are propagated to the wrapped writer in the
+// same thread too. Importantly, all messages the wrapped writer sends to its writeable need to be
+// serialized with any message sent to this object.
@interface GRXForwardingWriter : GRXWriter
- (instancetype)initWithWriter:(GRXWriter *)writer NS_DESIGNATED_INITIALIZER;
@end