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...