mirror of
https://github.com/Zygo/bees.git
synced 2025-06-15 17:26:15 +02:00
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>
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user