Merge pull request #2329 from zhongwuzw/fix-async

Minor optimize for dispatch_queue_async_safe
This commit is contained in:
DreamPiggy 2018-05-25 13:20:09 +08:00 committed by GitHub
commit 76f7eacdd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ FOUNDATION_EXPORT NSString *const SDWebImageErrorDomain;
#ifndef dispatch_queue_async_safe #ifndef dispatch_queue_async_safe
#define dispatch_queue_async_safe(queue, block)\ #define dispatch_queue_async_safe(queue, block)\
if (strcmp(dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL), dispatch_queue_get_label(queue)) == 0) {\ if (dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL) == dispatch_queue_get_label(queue)) {\
block();\ block();\
} else {\ } else {\
dispatch_async(queue, block);\ dispatch_async(queue, block);\