[swift-users] Swift 3 equivalent of dispatch_barrier_async

Daniel Dunbar daniel_dunbar at apple.com
Tue Jun 28 14:40:53 CDT 2016


The new spelling is:

queue.async(flags: .barrier) { ... }

 - Daniel

> On Jun 28, 2016, at 12:24 PM, Eric Miller via swift-users <swift-users at swift.org> wrote:
> 
> I tried searching github's swift-evolution for "dispatch_barrier_async", but don't see a mention of it.
> 
> Can I migrate this directly to swift 3, or do I need a larger refactor involving serial queues?
> 
> ```swift
> 
> let myConcurrentQueue = DispatchQueue(label: "concurrentQ", attributes: .concurrent)
> dispatch_barrier_async(myConcurrentQueue) { ... }
> 
> ```
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160628/90463094/attachment.html>


More information about the swift-users mailing list