Swift 3.0: Receiving error Can not convert value of type \'int\' to expected argument type \'DispatchQueue.GlobalQueuePriority\'
on creating di
DispatchQueue.global
expects the DispatchQueue.GlobalQueuePriority
enum, which is:
So in your case, you just write:
DispatchQueue.global(priority: .background).async(execute: { () -> Void in
})
If you want the lowest priority.
A quick check reveals, that DispatchQueue.global(priority:_)
is deprecated in iOS 8.
DispatchQueue.global(qos: .background).async {
}
Which gives you even more options to choose from: