addBarrierBlock(_:)
Invokes a block when the queue finishes all enqueued operations, and prevents subsequent operations from starting until the block has completed.
Declaration
func addBarrierBlock(_ barrier: @escaping @Sendable () -> Void)Parameters
- barrier:
The block to invoke after all currently enqueued operations have finished. Operations you add after the barrier block don’t start until the block has completed.
Discussion
This method is similar to dispatch_barrier_async.