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
groupThe dispatch group to associate with the submitted work item. If this is
nil, the work item is not associated with a group.qosThe QoS at which the work item should be executed. Defaults to
DispatchQoS.unspecified.flagsFlags that control the execution environment of the work item.
executeThe work item to be invoked on the queue.
Discussion
See Also
sync(execute:)
See Also
DispatchQoS
See Also
DispatchWorkItemFlags