Function

dispatch_group_enter

Explicitly indicates that a block has entered the group.

Declaration

void dispatch_group_enter(dispatch_group_t group);

Parameters

group

The dispatch group to update. This parameter cannot be NULL.

Discussion

Calling this function increments the current count of outstanding tasks in the group. Using this function (with dispatch_group_leave) allows your application to properly manage the task reference count if it explicitly adds and removes tasks from the group by a means other than using the dispatch_group_async function. A call to this function must be balanced with a call to dispatch_group_leave. You can use this function to associate a block with more than one group at the same time.

See Also

Updating the Group Manually

dispatch_group_leave

Explicitly indicates that a block in the group finished executing.