Open PipeDog opened 3 years ago
inline static void LKDispatch(BOOL sync, dispatch_queue_t _Nonnull queue, dispatch_block_t _Nonnull block) { if (sync) { block(); } else { if (dispatch_queue_get_label(queue) == dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL)) { block(); } else { dispatch_sync(queue, block); } } }
inline static void LKDispatch(BOOL sync, dispatch_queue_t _Nonnull queue, dispatch_block_t _Nonnull block) { if (sync) { block(); } else { if (dispatch_queue_get_label(queue) == dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL)) { block(); } else { dispatch_sync(queue, block); } } }