fn run_next_task()
Expand description

Switch current Running task to the task we have found, or there is no Ready task and we can exit with all applications completed