[swift-dev] DispatchQueue function in Swift 3.0

Philippe Hausler phausler at apple.com
Fri Oct 7 15:49:34 CDT 2016


I believe it got renamed to qos:

DispatchQueue.global(qos: .userInteractive).async {
    
}

etc.


> On Oct 7, 2016, at 6:11 AM, Yue Cui via swift-dev <swift-dev at swift.org> wrote:
> 
> 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.
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev



More information about the swift-dev mailing list