|
|
@ -68,7 +68,7 @@ |
|
|
|
typeof(self) strongSelf = weakSelf; |
|
|
|
typeof(self) strongSelf = weakSelf; |
|
|
|
if (strongSelf) { |
|
|
|
if (strongSelf) { |
|
|
|
BOOL finished = NO; |
|
|
|
BOOL finished = NO; |
|
|
|
@synchronized(self) { |
|
|
|
@synchronized(strongSelf) { |
|
|
|
if (!strongSelf->_alreadyFinished) { |
|
|
|
if (!strongSelf->_alreadyFinished) { |
|
|
|
strongSelf->_alreadyFinished = YES; |
|
|
|
strongSelf->_alreadyFinished = YES; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -78,9 +78,9 @@ |
|
|
|
if (!finished) { |
|
|
|
if (!finished) { |
|
|
|
// Cancellation is now impossible. None of the other three blocks can run concurrently with |
|
|
|
// Cancellation is now impossible. None of the other three blocks can run concurrently with |
|
|
|
// this one. |
|
|
|
// this one. |
|
|
|
[self.writeable writesFinishedWithError:nil]; |
|
|
|
[strongSelf.writeable writesFinishedWithError:nil]; |
|
|
|
// Skip any possible message to the wrapped writeable enqueued after this one. |
|
|
|
// Skip any possible message to the wrapped writeable enqueued after this one. |
|
|
|
self.writeable = nil; |
|
|
|
strongSelf.writeable = nil; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|