* stop the runner loop if all tasks are finished. * don't check for tasks.length ; instead check only state variable