The task might still be running after it is canceled but the task(line 837) references some variables which might be destroyed.
With CancelOrWait we cancle a task or wait for it if it has ben started. The comment even says "Wait on all pathfinding tasks."
This was itroduced with rP25657
BTW: that was the only use of Future<...>::Cancel()