Made progressBlock call back to the main queue by default.
This commit is contained in:
parent
0fc6f980b9
commit
cc2115e469
1 changed files with 3 additions and 1 deletions
|
|
@ -456,7 +456,9 @@ static void AFReachabilityCallback(SCNetworkReachabilityRef __unused target, SCN
|
|||
AFCompletionBlock originalCompletionBlock = [[operation.completionBlock copy] autorelease];
|
||||
operation.completionBlock = ^{
|
||||
if (progressBlock) {
|
||||
progressBlock([[batchedOperation.dependencies filteredArrayUsingPredicate:finishedOperationPredicate] count], [batchedOperation.dependencies count]);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
progressBlock([[batchedOperation.dependencies filteredArrayUsingPredicate:finishedOperationPredicate] count], [batchedOperation.dependencies count]);
|
||||
});
|
||||
}
|
||||
|
||||
if (originalCompletionBlock) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue