task priority inversion question.

A SwiftUI view has a .task(id: ) modifier.
The task, among other things, calls an async func

.task(id: item) {
// ...
if let item {
value = await item.someFunction()
}
// ...
}

someFunction() calls someOtherFunction() [not async] and
someOtherFunction() eventually does this:

if let imgPreview = CGImageSourceCreateThumbnailAtIndex(...) { ... }

At runtime in Xcode I see this notice on the above line.

[Internal] Thread running at User-initiated quality-of-service
class waiting on a lower QoS thread running at Default
quality-of-service class. Investigate ways to avoid
priority inversions

Does not item.someFunction() get the same priority as the
task? Where does the lower QoS thread come from?

And how can I learn more about it. And fix it?

0

If you have a fediverse account, you can quote this note from your own instance. Search https://sfba.social/users/marchyman/statuses/116265418790207775 on your instance and quote it. (Note that quoting is not supported in Mastodon.)