<html><body><p><tt><br>&gt; From: Daniel Eggert via swift-corelibs-dev &lt;swift-corelibs-dev@swift.org&gt;</tt><br><tt>&gt; <br>&gt; I’m trying to use libdispatch from Swift, but something is off with <br>&gt; DISPATCH_QUEUE_SERIAL &amp; DISPATCH_QUEUE_CONCURRENT:<br>&gt; <br>&gt; <br>&gt; func test() {<br>&gt; &nbsp; &nbsp; let queueA = dispatch_queue_create(&quot;a&quot;, DISPATCH_QUEUE_SERIAL)<br>&gt; &nbsp; &nbsp; let queueB = dispatch_queue_create(&quot;b&quot;, DISPATCH_QUEUE_CONCURRENT)<br>&gt; }<br>&gt; <br>&gt; <br>&gt; <br>&gt; Dispatch.swift:81:45: error: cannot convert value of type '()' to <br>&gt; expected argument type 'dispatch_queue_attr_t' (aka 'COpaquePointer')<br>&gt; &nbsp; &nbsp; let queueA = dispatch_queue_create(&quot;a&quot;, DISPATCH_QUEUE_SERIAL)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^~~~~~~~~~~~~~~~~~~~~<br>&gt; Dispatch.swift:82:45: error: use of unresolved identifier <br>&gt; 'DISPATCH_QUEUE_CONCURRENT'<br>&gt; &nbsp; &nbsp; let queueB = dispatch_queue_create(&quot;b&quot;, DISPATCH_QUEUE_CONCURRENT)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^~~~~~~~~~~~~~~~~~~~~~~~~<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. &nbsp;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>