task: add an idle queue

Add a second level queue which is only serviced when the local and global
queues are empty.

At some point there might be a need to implement a full priority queue,
but for now two classes are sufficient.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
Dieser Commit ist enthalten in:
Zygo Blaxell committed 2024-11-30 23:30:33 -05:00
1 Ursprung 099ad2ce7c
Commit b99d80b40f
2 Dateien geändert
+61 -3

Keine Dateien entsprechen Ihrer Suche

+3
Datei anzeigen
@@ -40,6 +40,9 @@ namespace crucible {
/// after the current instance exits.
void run() const;
/// Schedule task to run when no other Task is available.
void idle() const;
/// Schedule Task to run after this Task has run or
/// been destroyed.
void append(const Task &task) const;