NSOperationQueuethe class has a property underlyingQueuethat is used to set the send queue on which the instances will run NSOperation.
let dispatchQueue = dispatch_queue_create("custom.queue", DISPATCH_QUEUE_SERIAL)
let opQueue = NSOperationQueue()
opQueue.underlyingQueue = dispatchQueue
However, official documentation states that:
The value of this property should not be the value returned dispatch_get_main_queue
There seems to be no more explanation on this from Apple. However, using the main queue as quality underlyingQueuedoes not cause errors and does not lead to undesirable behavior. What are the reasons for this?
source
share