Replace the thread-local condition_variable with a "global" one.
If a task is added only one thread is notified. (before all thread were notified)
There is no condition_variable for lowPriorityTasks. Those are checked if no task is found with normal priority.