This is a major API breaking change, hopefully an improvement :)
Task creation is now done in 3 steps (instead of 2):
ProtoTask is created. It has the context information and an ID or a name
Function is assigned, and the task becomes an IdleTask
Dependencies are added, and the task can be ran, becoming RunningTask
In addition, all the task functions now receive an extra argument - &Arc<Notifier>. This is essentially a task context.
Main motivation for this change was to allow tasks to spawn child tasks from within the executing body. This is now possible: a task can spawn a proxy task using the notifier given as the argument. The proxy can have its own dependencies, since the caller decides when to run it.
This is a major API breaking change, hopefully an improvement :) Task creation is now done in 3 steps (instead of 2):
ProtoTask
is created. It has the context information and an ID or a nameIdleTask
RunningTask
In addition, all the task functions now receive an extra argument -
&Arc<Notifier>
. This is essentially a task context. Main motivation for this change was to allow tasks to spawn child tasks from within the executing body. This is now possible: a task can spawn a proxy task using the notifier given as the argument. The proxy can have its own dependencies, since the caller decides when to run it.