Function

dispatch_group_async_f

Submits an application-defined function to a dispatch queue and associates it with the specified dispatch group.

Declaration

void dispatch_group_async_f(dispatch_group_t group, dispatch_queue_t queue, void *context, dispatch_function_t work);

Parameters

group

A dispatch group to associate the submitted function with. The group is retained by the system until the application-defined function has run to completion. This parameter cannot be NULL.

queue

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

context

The application-defined context parameter to pass to the application-defined function.

work

The application-defined function to invoke on the target queue. The first parameter passed to this function is the value in the context parameter.

Discussion

Submits an application-defined function to a dispatch queue and associates it with the given dispatch group. The dispatch group can be used to wait for the completion of the application-defined functions it references.

See Also

Adding Work to the Group

dispatch_group_async

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software