aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/RxLibrary/GRXForwardingWriter.h
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-08-07 23:10:49 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-08-07 23:10:49 -0700
commit67ce098ccf6c7d5b64a85523af1c96e04e46312a (patch)
tree04353738b62fd4ff349b2f624b245566c3f7b9ae /src/objective-c/RxLibrary/GRXForwardingWriter.h
parentc678c30cf19d47961f04e5782b7890d3b289b7f0 (diff)
Clarify thread-safety expectations of GRXWriters
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