swift - Why can't "Binary operator '==' be applied to two 'dispatch_queue_t!' operands" -


i receive error binary operator '==' cannot applied 2 'dispatch_queue_t!' operands when this:

let mysocketqueue = dispatch_queue_create("somenamehere", nil); if mysocketqueue == dispatch_get_global_queue(dispatch_queue_priority_low, 0) {     print("same") } 

how supposed compare these 2 dispatch_queue_t! types?

there no == operator dispatch_queue_t.

however, since reference type, can use "identical-to" operator === check if 2 constants or variables refer same single instance:

if mysocketqueue === dispatch_get_global_queue(dispatch_queue_priority_low, 0) {     print("same") } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -