From 91d46140287887daef7fab2796a0735c45cb7d6f Mon Sep 17 00:00:00 2001 From: Sergey Gavrilyuk Date: Fri, 8 Jun 2012 15:44:42 -0400 Subject: [PATCH] in case there is an image processing block, success block should be called on the same queue as without one. --- AFNetworking/AFImageRequestOperation.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AFNetworking/AFImageRequestOperation.m b/AFNetworking/AFImageRequestOperation.m index 02b7209..08c4b67 100644 --- a/AFNetworking/AFImageRequestOperation.m +++ b/AFNetworking/AFImageRequestOperation.m @@ -113,7 +113,9 @@ static dispatch_queue_t image_request_operation_processing_queue() { dispatch_async(image_request_operation_processing_queue(), ^(void) { NSImage *processedImage = imageProcessingBlock(image); - dispatch_async(dispatch_get_main_queue(), ^(void) { + dispatch_async(requestOperation.successCallbackQueue? + requestOperation.successCallbackQueue: + dispatch_get_main_queue(), ^(void) { success(operation.request, operation.response, processedImage); }); });