Making sure all access to self.runningOperations is synchronized

This commit is contained in:
Bogdan Poplauschi 2015-10-25 19:35:26 +02:00
parent ac98896099
commit 04a0431ae9
1 changed files with 5 additions and 1 deletions

View File

@ -301,7 +301,11 @@
}
- (BOOL)isRunning {
return self.runningOperations.count > 0;
BOOL isRunning = NO;
@synchronized(self.runningOperations) {
isRunning = (self.runningOperations.count > 0);
}
return isRunning;
}
@end