compareReadyTasks function

int compareReadyTasks(
  1. StoredTask a,
  2. StoredTask b
)

Scheduling order used by QueueStorage.getNextReady.

Highest StoredTask.priority first, then compareStoredTasks.

Implementation

int compareReadyTasks(StoredTask a, StoredTask b) {
  final byPriority = b.priority.compareTo(a.priority);
  if (byPriority != 0) return byPriority;
  return compareStoredTasks(a, b);
}