+
+ /**
+ * Checks wether tasks are left including idle task.
+ *
+ * @return $tasksLeft Wether there are tasks left to handle
+ */
+ function hasTasksLeft ();
+
+ /**
+ * Handles all tasks by checking if they should startup or if it is their
+ * turn to run. You should use this method in a while() loop in conjuntion
+ * with hasTasksLeft() so you can e.g. shutdown by adding a ShutdownTask
+ * which will attempt to remove all tasks from the task handler.
+ *
+ * @return void
+ */
+ function handleTasks ();