Index: src/Scheduler.h |
=================================================================== |
--- a/src/Scheduler.h |
+++ b/src/Scheduler.h |
@@ -66,7 +66,24 @@ |
} |
} |
-/* |
+/** |
+ * Interface class for scheduled tasks. |
+ */ |
+struct TaskFunctionInterface |
+{ |
+ /** |
+ * The main function of the task, |
+ * the moral equivalent to the main function of the thread. |
+ */ |
+ virtual void operator()() = 0; |
+ /** |
+ * Request that the task end itself early, without needing to complete. |
+ * Reserved for future use. |
+ */ |
+ virtual void Interrupt() {}; |
+}; |
+ |
+/** |
* Execute a task immediately in detached thread that's used only for this task. |
* |
* The present version is nothing more than a rewrite of the legacy behavior, |