Hi,
Questions
- How I can get determine the current priority of the task. (Task.currentPriority). I don't know how to make sense out of it, printing prints the rawValue.
- What is the order of priority (I couldn't find documentation on the order, lowest to highest)?
My attempt:
Is there a better way to determine the priority?
Task {
print("current priority = \(Task.currentPriority)")
switch Task.currentPriority {
case .userInitiated:
print("userInitiated")
case .high:
print("high")
case .medium:
print("medium")
case .low:
print("low")
case .background:
print("background")
default:
print("something else")
}
}