[OPTIM] task: don't scan the run queue if we know it's empty

It happens quite often in fact, so let's save those precious cycles.
1 file changed