async(group:execute:)
Schedules a work item asynchronously for execution and associates it with the specified dispatch group.
Declaration
func async(group: DispatchGroup, execute workItem: DispatchWorkItem)Parameters
- group:
The dispatch group to associate with the work item. This parameter cannot be
NULL. - workItem:
The work item containing the task to execute. For information on how to create this work item, see Dispatchworkitem.
Discussion
This method adds the work item to the group before scheduling it on the current queue.