Edit

Share via


DispatchQueue.DispatchBarrierAsync Method

Definition

Overloads

DispatchBarrierAsync(DispatchBlock)
DispatchBarrierAsync(Action)

Submits a barrier block for asynchronous execution on a dispatch queue

DispatchBarrierAsync(DispatchBlock)

public void DispatchBarrierAsync (CoreFoundation.DispatchBlock block);
member this.DispatchBarrierAsync : CoreFoundation.DispatchBlock -> unit

Parameters

Applies to

DispatchBarrierAsync(Action)

Submits a barrier block for asynchronous execution on a dispatch queue

public void DispatchBarrierAsync (Action action);
member this.DispatchBarrierAsync : Action -> unit

Parameters

action
Action

Code block to submit as a barrier.

Remarks

Submits a block to a dispatch queue like DispatchAsync(Action) does and marks that block as a barrier.

This is only relevant for concurrent queues.

The submitted code block will wait for all pending concurrent blocks to complete execution, then it will execute the code block to completion. During the time that the barrier executes, any other code blocks submitted are queued, and will be scheduled to run (possibly concurrently) after the barrier method completes.

Applies to