Function

dispatch_group_leave

Explicitly indicates that a block in the group finished executing.

Declaration

void dispatch_group_leave(dispatch_group_t group);

Parameters

group

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

Discussion

Calling this function decrements the current count of outstanding tasks in the group. Using this function (with dispatch_group_enter) 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 balance a call to dispatch_group_enter. It is invalid to call it more times than dispatch_group_enter, which would result in a negative count.

See Also

Updating the Group Manually

dispatch_group_enter

Explicitly indicates that a block has entered the group.