[swift-corelibs-dev] [libdispatch] DISPATCH_QUEUE_SERIAL & DISPATCH_QUEUE_CONCURRENT

Daniel Eggert danieleggert at me.com
Tue Jan 19 07:25:37 CST 2016


I’m trying to use libdispatch from Swift, but something is off with DISPATCH_QUEUE_SERIAL & DISPATCH_QUEUE_CONCURRENT:


func test() {
    let queueA = dispatch_queue_create("a", DISPATCH_QUEUE_SERIAL)
    let queueB = dispatch_queue_create("b", DISPATCH_QUEUE_CONCURRENT)
}



Dispatch.swift:81:45: error: cannot convert value of type '()' to expected argument type 'dispatch_queue_attr_t' (aka 'COpaquePointer')
    let queueA = dispatch_queue_create("a", DISPATCH_QUEUE_SERIAL)
                                            ^~~~~~~~~~~~~~~~~~~~~
Dispatch.swift:82:45: error: use of unresolved identifier 'DISPATCH_QUEUE_CONCURRENT'
    let queueB = dispatch_queue_create("b", DISPATCH_QUEUE_CONCURRENT)
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~


/Daniel



More information about the swift-corelibs-dev mailing list