mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Enable much simpler Task management: each time a Task needs to be done at least once in the future, simply invoke the run() method on the Task. The Task will ensure that it only runs once, only appears in a queue once, and will run again if a run request is made while the Task is already running. Make the queue policy a member of the Task rather than a method. This enables Tasks to reschedule themselves, possibly on the appropriate queue if we have more than one of those some day. This happens to make Tasks more similar to Linux kernel workers. This similarity is coincidental, but not undesirable. Signed-off-by: Zygo Blaxell <bees@furryterror.org>