<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchGroup/notify(qos:flags:queue:execute:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:So17OS_dispatch_groupC8DispatchE6notify3qos5flags5queue7executeyAC0D3QoSV_AC0D13WorkItemFlagsVSo0a1_b1_H0CyyXLtF"
  },
  "title" : "notify(qos:flags:queue:execute:)"
}
-->

# notify(qos:flags:queue:execute:)

Schedules the submission of a block with the specified attributes to a queue when all tasks in the current group have finished executing.

```
func notify(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], queue: DispatchQueue, execute work: @escaping () -> Void)
```

## Parameters

`qos`

The quality of service class for the work to be performed.

`flags`

Options for how the work is performed.

    For possible values, see [`DispatchWorkItemFlags`](/documentation/Dispatch/DispatchWorkItemFlags)    .

`queue`

The queue to which the supplied block is submitted when the group completes.

`work`

The work to be performed on the dispatch queue when the group is completed.

## Discussion

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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)