Anton Tropashko
Anton Tropashko

Reputation: 5806

dispatchGroup.notify(queue: inheriting QOS from the current context

Is there a way to dispatchGroup.notify(queue: inheriting QOS from the current context? (assuming there IS qos metainfo that's dragged through all the contexts to begin with) The documentation on .unspecified seems terse: at least I failed to grasp it.

UPD20220810 Explore structured concurrency in Swift WWDC2021 explores the topic for newer APIs that postdate gcd.

Upvotes: 1

Views: 320

Answers (1)

Rob
Rob

Reputation: 437442

With, notify(qos:flags:queue:execute:), you can specify .inheritQoS:

group.notify(flags: .inheritQoS, queue: queue) {
    ... 
}

Upvotes: 1

Related Questions