Permalink
Browse files

A fix for batch enqueue completion block returning on background thread

  • Loading branch information...
1 parent 913ce47 commit 0fc6f980b97df724c9d7e76f8008cdc325ac174d @kirsplatrick kirsplatrick committed Feb 28, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 AFNetworking/AFHTTPClient.m
View
4 AFNetworking/AFHTTPClient.m
@@ -442,7 +442,9 @@ - (void)enqueueBatchOfHTTPRequestOperations:(NSArray *)operations
{
NSBlockOperation *batchedOperation = [NSBlockOperation blockOperationWithBlock:^{
if (completionBlock) {
- completionBlock(operations);
+ dispatch_async(dispatch_get_main_queue(), ^{
+ completionBlock(operations);
+ });
}
}];

0 comments on commit 0fc6f98

Please sign in to comment.