Minor optimize for dispatch_queue_async_safe
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -89,7 +89,7 @@ FOUNDATION_EXPORT NSString *const SDWebImageErrorDomain; | @@ -89,7 +89,7 @@ FOUNDATION_EXPORT NSString *const SDWebImageErrorDomain; | ||
89 | 89 | ||
90 | #ifndef dispatch_queue_async_safe | 90 | #ifndef dispatch_queue_async_safe |
91 | #define dispatch_queue_async_safe(queue, block)\ | 91 | #define dispatch_queue_async_safe(queue, block)\ |
92 | - if (strcmp(dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL), dispatch_queue_get_label(queue)) == 0) {\ | 92 | + if (dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL) == dispatch_queue_get_label(queue)) {\ |
93 | block();\ | 93 | block();\ |
94 | } else {\ | 94 | } else {\ |
95 | dispatch_async(queue, block);\ | 95 | dispatch_async(queue, block);\ |
-
Please register or login to post a comment