[swift-dev] DispatchQueue function in Swift 3.0

Yue Cui cuiyue at msu.edu
Fri Oct 7 08:11:34 CDT 2016


Does anyone know the equivalent function of DispatchQueue in Swift 3.0?

Thanks in advance.
----------------------------------------------------------------
For the DispatchQueue, the swift 3 has changed it's properties.

The code for swift 2.xx looks like this:

let priority = DispatchQueue.GlobalQueuePriority.default
                DispatchQueue.global(priority: priority).async {
                    // ALL the API processing..
                    DispatchQueue.main.async {
                        // ALL the UI reload..
                    }
                }

the error messages shown in Swift 3.0 are:
'default' was deprecated in iOS 8.0: Use qos attributes instead.
'global(priority:)' was deprecated in iOS 8.0.


More information about the swift-dev mailing list