Contents

dispatch_group_async

Schedules a block asynchronously for execution and simultaneously associates it with the specified dispatch group.

Declaration

extern void dispatch_group_async(dispatch_group_t group, dispatch_queue_t queue, dispatch_block_t block);

Parameters

  • group:

    A dispatch group to associate the submitted block object with. The group is retained by the system until the block has run to completion. This parameter cannot be NULL.

  • queue:

    The dispatch queue to which the block object is submitted for asynchronous invocation. The queue is retained by the system until the block has run to completion. This parameter cannot be NULL.

  • block:

    The block object to perform asynchronously. This function performs a Block_copy and Block_release on behalf of the caller.

Discussion

Submits a block to a dispatch queue and associates the block object with the given dispatch group. The dispatch group can be used to wait for the completion of the block objects it references.

See Also

Adding Work to the Group