Minor optimize for dispatch_queue_async_safe
This commit is contained in:
parent
55d65569dc
commit
7515f06b44
|
@ -89,7 +89,7 @@ FOUNDATION_EXPORT NSString *const SDWebImageErrorDomain;
|
|||
|
||||
#ifndef dispatch_queue_async_safe
|
||||
#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();\
|
||||
} else {\
|
||||
dispatch_async(queue, block);\
|
||||
|
|
Loading…
Reference in New Issue