Refactoring a colleague\'s code, and I\'m looking for the equivalent of dispatch_barrier_async in swift 3. There are a lot of queues at play, and his design is to b
dispatch_barrier_async
The async() method has a flags parameter which accepts a .barrier option:
async()
flags
.barrier
func subscribe(subscriber: DaoDelegate) { (self.subscribers.q).async(flags: .barrier) { //... } }