For what it’s worth @johannesweiss also brought up the point that Priority is weirdly married to Apple platforms with the names - ignoring what actual numeric values we’d use - a long time ago in early reviews.
It’s totally true and they’re pretty unapplicable to non-Apple platforms...
It seems to me like one of those battles that we don’t really see worth fighting hard, given that the primary other platform we care about is server-side so mostly including Linux where... Using priorities to influence task progress just isn’t a thing really... Servers are usually far more overcomitted with resources than e.g. „your iPhone” and there isn’t really much „complete THIS ONE NOW” as requests are more-or-less created equal...
I’m more concerned with thread-starvation than some fiddling with priorities in server-side systems as the grand scale of things — all users being served equally well, wins over some micro optimizations of specific tasks. At the same time, if there are any „super critical task” e.g. some heartbeating or crucial part of the clustered server application, it’s never going to be enough just to use priority to solve these — you’ll want to dedicate entire thread-pools to the important work. So these actually important tasks, which keep the cluster together and healthy, never have to compete at all with any „user tasks”.
I could be completely wrong, given some specific applications — but in my years of server side development, including large scale distributed actor systems; one never resorted to priority use. Neither have I ever seen them used in Netty, Aeron or similar applications. It also isn’t very „the actor way” to have entire mailboxes be based on priority, we had this in Akka as an optional thing and they were pretty useless in practice.
—
Having that said... it would be nice™ to not hardcode the apple naming of priorities; but it seems no-one so far really came up with a workable alternative design. We, so far, at least didn’t have it as high priority (pun intended) task enough to really see this as a blocker. (And by „we” I also mean the Linux support for Swift concurrency).
// Caveat for readers: my perspective is very much that of a server ecosystem developer; so it’s not that I like the Apple priorities or anything; it just seems to be a non-topic on servers really. I don’t know what these would mean for windows; but I assume we’d be able to add specific new prioritiy values if the need arises..
// Caveat: I felt pretty sad writing this to be honest; It would be very nice to have the Swift model be pure and not so tainted by Dispatch.
It’d be great if we could find a workable model — as John said, looking for workable ideas, but also worried it’d be one of those never-ending naming bike-shed topics... 