Fixed a bug where a parent task is destroyed before init_graph is called on child tasks.
Before this PR init_graph was adding the dependency from the child task to the post event of the parent. But init_graph is only called when the child task is actually processed to be put into the ready queue. This leads to a situation where the parent task can be destroyed and its post event will be notified while the child tasks are still in the emplacement queue.
Moved adding the dependency to the parent task from the child task to emplace_task.
This moves some work from scheduling to emplacement.
Fixed a bug where a parent task is destroyed before
init_graph
is called on child tasks. Before this PRinit_graph
was adding the dependency from the child task to the post event of the parent. Butinit_graph
is only called when the child task is actually processed to be put into the ready queue. This leads to a situation where the parent task can be destroyed and its post event will be notified while the child tasks are still in the emplacement queue. Moved adding the dependency to the parent task from the child task toemplace_task
. This moves some work from scheduling to emplacement.