Schedules an application-defined function to be submitted to a queue when a group of previously submitted block objects have completed.
- iOS 4.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The dispatch group to observe. The group is retained by the system until the application-defined function has run to completion. This parameter cannot be
The queue to which the supplied block is submitted when the group completes. The queue is retained by the system until the application-defined function has run to completion. This parameter cannot be
The application-defined context parameter to pass to the application-defined function.
The application-defined function to invoke on the target queue. The first parameter passed to this function is the value in the
This function schedules a notification block to be submitted to the specified queue when all blocks associated with the dispatch group have completed. If the group is empty (no block objects are associated with the dispatch group), the notification block object is submitted immediately.
When the notification block is submitted, the group is empty, and can be reused for additional blocks. See
dispatch for more information.
If your app isn’t using ARC, you should call
dispatch on a dispatch group when it’s no longer needed.