[Issue #56] Wrapping completion block in async_dispatch to main queue
This commit is contained in:
parent
b7724922c4
commit
f1fa6f1a6f
1 changed files with 4 additions and 2 deletions
|
|
@ -149,8 +149,10 @@ static inline NSString * AFKeyPathFromOperationState(AFOperationState state) {
|
|||
|
||||
__block id _blockSelf = self;
|
||||
[super setCompletionBlock:^ {
|
||||
block();
|
||||
[_blockSelf setCompletionBlock:nil];
|
||||
dispatch_async(dispatch_get_main_queue(), ^(void) {
|
||||
block();
|
||||
[_blockSelf setCompletionBlock:nil];
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue