Class: ITaskQueue | ./src/peak/running/interfaces.py | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Schedule and run prioritized periodic tasks using the system reactor When more than one task is available for execution, the highest priority
one is executed. (Equal priority tasks are scheduled in round-robin
fashion.) A task is considered available for execution when it is first
added, and when its Whenever the queue is enabled (the default state), tasks are executed and scheduled. When disabled, execution and scheduling stops until re-enabled. Enabling and disabling do not affect the task schedule in any way, although while the queue is disabled, tasks may pile up in the "available" state. (Note: a task queue is allowed to let the system reactor hold onto waiting tasks, so if the reactor's state is reset, queue contents may be lost whether the queue is enabled or not.) Unlike many scheduling-related components, you may have as many of
these as you like, but each must have access to an Note, by the way, that this interface does not include a way to
remove tasks from the queue. A task may remove itself from the
queue by raising
|