Comments on BufferedPipe

This commit is contained in:
Muxi Yan 2017-06-05 09:22:15 -07:00
parent 033db460ba
commit d6545bb3df
1 changed files with 6 additions and 6 deletions

View File

@ -33,10 +33,13 @@
#import "GRXBufferedPipe.h"
@interface GRXBufferedPipe ()
@property(atomic) NSError *errorOrNil;
@end
@implementation GRXBufferedPipe {
id<GRXWriteable> _writeable;
BOOL _inputIsFinished;
NSError *_errorOrNil;
dispatch_queue_t _writeQueue;
}
@ -90,7 +93,7 @@
dispatch_async(_writeQueue, ^{
GRXBufferedPipe *strongSelf = weakSelf;
if (strongSelf) {
[strongSelf finishWithError:_errorOrNil];
[strongSelf finishWithError:nil];
}
});
}
@ -123,7 +126,7 @@
return;
case GRXWriterStateStarted:
if (_state == GRXWriterStatePaused) {
_state = newState;
_state = newState;
dispatch_resume(_writeQueue);
}
return;
@ -134,9 +137,6 @@
}
- (void)startWithWriteable:(id<GRXWriteable>)writeable {
if (_state != GRXWriterStateNotStarted) {
return;
}
_state = GRXWriterStateStarted;
_writeable = writeable;
dispatch_resume(_writeQueue);