<html><body><p><tt><br>> From: Daniel Eggert via swift-corelibs-dev <swift-corelibs-dev@swift.org></tt><br><tt>> <br>> I’m trying to use libdispatch from Swift, but something is off with <br>> DISPATCH_QUEUE_SERIAL & DISPATCH_QUEUE_CONCURRENT:<br>> <br>> <br>> func test() {<br>> let queueA = dispatch_queue_create("a", DISPATCH_QUEUE_SERIAL)<br>> let queueB = dispatch_queue_create("b", DISPATCH_QUEUE_CONCURRENT)<br>> }<br>> <br>> <br>> <br>> Dispatch.swift:81:45: error: cannot convert value of type '()' to <br>> expected argument type 'dispatch_queue_attr_t' (aka 'COpaquePointer')<br>> let queueA = dispatch_queue_create("a", DISPATCH_QUEUE_SERIAL)<br>> ^~~~~~~~~~~~~~~~~~~~~<br>> Dispatch.swift:82:45: error: use of unresolved identifier <br>> 'DISPATCH_QUEUE_CONCURRENT'<br>> let queueB = dispatch_queue_create("b", DISPATCH_QUEUE_CONCURRENT)<br>> ^~~~~~~~~~~~~~~~~~~~~~~~~<br></tt><br><tt>Hi,</tt><br><br><tt> I believe the issue is that the definition of DISPATCH_QUEUE_SERIAL and DISPATCH_QUEUE_CONCURRENT can't be processed by the Swift importer.</tt><br><br><tt> There's a pull request that updates the Dispatch overlay (</tt><a href="https://github.com/apple/swift/pull/974"><tt>https://github.com/apple/swift/pull/974</tt></a><tt>) that we've been using to work around this. It is working around </tt><a href="https://bugs.swift.org/browse/SR-141"><tt>https://bugs.swift.org/browse/SR-141</tt></a><br><br><tt>--dave</tt><br><tt> </tt><BR>
</body></html>