Since dispatch_get_current_queue() is deprecated, we could compare current and your queues by their labels (or specifics as @jkh suggested)
For label use
dispatch_queue_get_label(dispatch_queue_t queue);
and pass DISPATCH_CURRENT_QUEUE_LABEL for get label of current queue
For specific:
dispatch_queue_get_specific(dispatch_queue_t queue, const void *key);
for get you queue specific and
dispatch_get_specific(const void *key);
for current
It's require to set one or both of label and specific for your queue.
For example when you create it
dispatch_queue_create(const char *label, dispatch_queue_attr_t attr);
or using setters for specific
dispatch_queue_set_specific(dispatch_queue_t queue, const void *key,
void *context, dispatch_function_t destructor);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…