Code reformatting and adding conditional callback queue dispatch to UIImage callback

This commit is contained in:
Mattt Thompson 2012-06-09 09:52:28 -04:00
parent 91d4614028
commit 9b515d4ebe

View file

@ -82,7 +82,7 @@ static dispatch_queue_t image_request_operation_processing_queue() {
dispatch_async(image_request_operation_processing_queue(), ^(void) {
UIImage *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);
});
});
@ -113,9 +113,7 @@ static dispatch_queue_t image_request_operation_processing_queue() {
dispatch_async(image_request_operation_processing_queue(), ^(void) {
NSImage *processedImage = imageProcessingBlock(image);
dispatch_async(requestOperation.successCallbackQueue?
requestOperation.successCallbackQueue:
dispatch_get_main_queue(), ^(void) {
dispatch_async(requestOperation.successCallbackQueue ? requestOperation.successCallbackQueue : dispatch_get_main_queue(), ^(void) {
success(operation.request, operation.response, processedImage);
});
});