Fix the wrong subclass which does not override `isConcurrent` method

This commit is contained in:
DreamPiggy 2020-05-06 10:32:35 +08:00
parent f51992cfd6
commit 54771ceb22
1 changed files with 6 additions and 3 deletions

View File

@ -41,9 +41,8 @@
return;
}
[self willChangeValueForKey:@"isExecuting"];
self.finished = NO;
self.executing = YES;
[self didChangeValueForKey:@"isExecuting"];
if (self.executionBlock) {
self.executionBlock(self);
@ -68,8 +67,8 @@
- (void)complete {
@synchronized (self) {
if (self.isExecuting) {
self.executing = NO;
self.finished = YES;
self.executing = NO;
}
}
}
@ -86,4 +85,8 @@
[self didChangeValueForKey:@"isExecuting"];
}
- (BOOL)isConcurrent {
return YES;
}
@end