aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/RxLibrary
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-07-29 12:05:19 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-07-29 12:05:19 -0700
commit860b1da060e2250aaff905d3af7647b017f7a1ad (patch)
tree091f003bbf50bbd5730533d13e12a4e3fadab0d6 /src/objective-c/RxLibrary
parente5cd1765ffbdaf2badff71ecee5f464a2a924f72 (diff)
Resume GRXBufferedPipe when it gets dealloced
Diffstat (limited to 'src/objective-c/RxLibrary')
-rw-r--r--src/objective-c/RxLibrary/GRXBufferedPipe.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/objective-c/RxLibrary/GRXBufferedPipe.m b/src/objective-c/RxLibrary/GRXBufferedPipe.m
index 99cb0ad971..577a5e9a42 100644
--- a/src/objective-c/RxLibrary/GRXBufferedPipe.m
+++ b/src/objective-c/RxLibrary/GRXBufferedPipe.m
@@ -110,4 +110,12 @@
self.state = GRXWriterStateFinished;
}
+- (void)dealloc {
+ GRXWriterState state = self.state;
+ if (state == GRXWriterStateNotStarted ||
+ state == GRXWriterStatePaused) {
+ dispatch_resume(_writeQueue);
+ }
+}
+
@end