I'm programming my first Swift 3 but I came across the following error
dispatch_queue_t is unavailable in swift.
var queue: dispatch_queue_t?
var debugPrint = false
public init() {
let uuid = NSUUID().uuidString
let queueLabel = "tomlogger-queue-" + uuid
queue = dispatch_queue_create(queueLabel, DISPATCH_QUEUE_SERIAL)
}
Does anyone know how I solve this error,
Thomas
You need to use DispatchQueue
instead, libdispatch was modernised to match the swift 3 syntax, see the proposal SE-0088
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With