Skip to content

Instance MethodDispatch

async(group:qos:flags:execute:)

Submits a work item to a dispatch queue and optionally associates it with a dispatch group. The dispatch group may be used to wait for the completion of the work items it references.
func async(group: DispatchGroup? = nil, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], execute work: @escaping @Sendable () -> Void)

Parameters

group

The dispatch group to associate with the submitted work item. If this is nil, the work item is not associated with a group.

qos

The QoS at which the work item should be executed. Defaults to DispatchQoS.unspecified.

flags

Flags that control the execution environment of the work item.

execute

The work item to be invoked on the queue.

Discussion

See Also

sync(execute:)

See Also

DispatchQoS

See Also

DispatchWorkItemFlags