Comments on waiting for tasks, optimized waiting code.