Share via


DispatchGroup Class

Definition

Manages group of code blocks allows for aggregate synchronization.

public class DispatchGroup : CoreFoundation.DispatchObject
type DispatchGroup = class
    inherit DispatchObject
Inheritance

Remarks

Code block can be executed on different dispatch queues but managed as a group.

Constructors

Name Description
DispatchGroup()

Properties

Name Description
Handle (Inherited from DisposableObject)
Owns (Inherited from DisposableObject)

Methods

Name Description
Activate() (Inherited from DispatchObject)
ClearHandle() (Inherited from DisposableObject)
Create()

Creates a new dispatch group.

DispatchAsync(DispatchQueue, Action)

Submits a block to a dispatch queue and associates the block with the given dispatch group.

Dispose() (Inherited from DisposableObject)
Dispose(Boolean) (Inherited from NativeObject)
Enter()

Explicitly sets that a code block is beeing managed by the group.

Equals(Object) (Inherited from DisposableObject)
GetCheckedHandle() (Inherited from DisposableObject)
GetHashCode() (Inherited from DisposableObject)
InitializeHandle(NativeHandle) (Inherited from DisposableObject)
Leave()

Releases a code block association with the group.

Notify(DispatchQueue, Action)

Schedule a block to be submitted to a queue when all the blocks associated with a group have completed.

Notify(DispatchQueue, DispatchBlock)
Release() (Inherited from DispatchObject)
Retain() (Inherited from DispatchObject)
SetTargetQueue(DispatchQueue) (Inherited from DispatchObject)
Wait(DispatchTime)

Waits synchronously for all blocks in the group to complete or the specified timeout has elapsed.

Wait(TimeSpan)

Extension Methods

Name Description
GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)

Applies to