Type 'DispatchQueue.Attributes' has no membership 'serial'

I converted the existing Swift2.3 code to Swift3.0 using Xcode8 beta4. Xcode automatically converts the syntax to Swift3.0, but cannot create the next dispatch queue.

private let serialQueue = DispatchQueue(label: "identifier", qos: DispatchQueue.Attributes.serial)

+6
source share
1 answer

There is no .serial attribute, but the default send queue if you did not specify the .concurrent attribute:

 let serialQueue = DispatchQueue(label: "label") let concurrentQueue = DispatchQueue(label: "label", attributes: .concurrent) 

Source: https://forums.developer.apple.com/message/159457#159457 in the Apple Developer Forum.

+13
source

All Articles