I think it's enough to check for tasks to run when another task finishes. Actually it might be interesting to optimize and only try to run the tasks that were explicitly depending on the task that finished in the future (instead of iterating the entire list of pending tasks every time).