I am creating a SnapOperationQueue , which is a queue of operations with several extensions that I like. One of them is the re-prioritization of groups of operations. The operation is added with one of these four priorities (SnapOperationQueuePriority):
case Highest
case High
case Normal
case Low
In the current implementation I have it so that .Low and .Highest will not change, but .High and .Normal will be.
I would like to change this to have upper and lower priority thresholds. That is, I can say that this operation, which we could do now (.Low), can become very important in a sense (.High), i.e. when pre-caching images, and this image is suddenly required on the screen. These thresholds should also indicate that some operations, even in the group that is redistributed, will not be redistributed lower than anything, that is, the login operation (.Highest) should remain .Highest
For this, I wanted to change my enum as follows:
case Highest(lowerThreshold: SnapOperationQueuePriority = .Highest)
case High(lowerThreshold: SnapOperationQueuePriority = .Low, higherThreshold: SnapOperationQueuePriority = .High)
case Normal(lowerThreshold: SnapOperationQueuePriority = .Low, higherThreshold: SnapOperationQueuePriority = .High)
case Low(higherThreshold: SnapOperationQueuePriority = .Low)
, " toupe". , , , , .
, , API , API?