[swift-corelibs-dev] [libdispatch] DISPATCH_QUEUE_SERIAL & DISPATCH_QUEUE_CONCURRENT
Tony Parker
anthony.parker at apple.com
Tue Jan 19 11:56:53 CST 2016
Hi Dave, Daniel,
I responded in the bug but I will also respond here:
On Linux, I expect there to be no overlay. Instead we will just have a module map and swift files created by the dispatch project itself. This is what we do for Foundation, and it does require that stuff in the Darwin overlay is duplicated as part of the swift-corelibs-foundation project for Linux.
The purpose of the overlay on Darwin is that we cannot yet ship Swift code as part of dispatch itself (since the standard library is shipped with each app as a static library). We don’t have that limitation on Linux.
- Tony
> On Jan 19, 2016, at 5:38 AM, David P Grove via swift-corelibs-dev <swift-corelibs-dev at swift.org> wrote:
>
>
> > From: Daniel Eggert via swift-corelibs-dev <swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>>
> >
> > 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)
> > ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Hi,
>
> I believe the issue is that the definition of DISPATCH_QUEUE_SERIAL and DISPATCH_QUEUE_CONCURRENT can't be processed by the Swift importer.
>
> There's a pull request that updates the Dispatch overlay (https://github.com/apple/swift/pull/974 <https://github.com/apple/swift/pull/974>) that we've been using to work around this. It is working around https://bugs.swift.org/browse/SR-141 <https://bugs.swift.org/browse/SR-141>
>
> --dave
>
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev <https://lists.swift.org/mailman/listinfo/swift-corelibs-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20160119/0b4742af/attachment.html>
More information about the swift-corelibs-dev
mailing list