diff options
author | Jorge Canizales <jcanizales@google.com> | 2015-05-18 17:41:20 -0700 |
---|---|---|
committer | Jorge Canizales <jcanizales@google.com> | 2015-05-18 17:41:20 -0700 |
commit | 63e4091dbc0902ea0447bb30940f757478abdef7 (patch) | |
tree | c03474421924af0e3fc302aaa38b491560fc2cfd /src/objective-c/RxLibrary/GRXBufferedPipe.h | |
parent | 421f6c9488795a1a125770f258b9cf4feef4f293 (diff) |
Add warning about the perils of buffering without bounds
Diffstat (limited to 'src/objective-c/RxLibrary/GRXBufferedPipe.h')
-rw-r--r-- | src/objective-c/RxLibrary/GRXBufferedPipe.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/objective-c/RxLibrary/GRXBufferedPipe.h b/src/objective-c/RxLibrary/GRXBufferedPipe.h index 02dc6b5fe8..4147362ba4 100644 --- a/src/objective-c/RxLibrary/GRXBufferedPipe.h +++ b/src/objective-c/RxLibrary/GRXBufferedPipe.h @@ -45,6 +45,12 @@ // GRXWriterStateStarted. // If it receives an error (via -didFinishWithError:), it will drop any buffered values and // propagate the error immediately. +// +// Beware that a pipe of this type can't prevent receiving more values when it is paused (for +// example if used to write data to a congested network connection). Because in such situations the +// pipe will keep buffering all data written to it, your application could run out of memory and +// crash. If you want to react to flow control signals to prevent that, instead of using this class +// you can implement an object that conforms to GRXWriter. @interface GRXBufferedPipe : NSObject<GRXWriteable, GRXWriter> // Convenience constructor. |