In Swift 3, an instance of DispatchQueue is created:
DispatchQueue(label: String,
qos: DispatchQoS,
attributes: DispatchQueue.Attributes,
autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency,
target: DispatchQueue?)
I see code samples from StackOverFlow, it can be nil, .global () or .main, what is the value of this parameter target?
I think .main means the queue will be started in the main thread, but why .nil or .global ()?
source
share