More work from #1672
From review of the PR #2193
- the TaskGroup does not order tasks by position(), they are ordered on insertion order and it just happens to be that. Change to guarantee insertion order.
- the check in
TaskGroup. shouldFailFast() is not strict enough, we want to check for tasks before the current task that means we should check the position not reference quality.
- some comment and code cleanup.