When a task is added to the task manager, it may be given an optional priority. We've actually seen these priorities already; remember the sort column of the
print(taskMgr) output? That column shows the priorities assigned to the tasks in the task manager. Tasks with a lower priority are executed before tasks with a higher priority. That may seem a little backwards, but that's the way it is.
The default priority of a new task is
0. To assign a different priority, just add a priority number to the end of the
taskMgr.add(self.myTask, "My Task Name", 5) taskMgr.doMethodLater(10, self.myTask, "My Task Name", 129)
Tasks with the same priority number are executed in no particular order, and that order may ...