Make decision how many workers to notify in Runtime
The decision how many workers should be notified on new work should be
made in the runtime.
This is the whole reason why WorkerWakeupStrategies
provide notify{One,Many,All}
functions.
This change also simplifies the logic used in SemaphoreWorkerSleepStrategy
.
The old simply copy-pasted semaphore based implementation could then
be split up into much smaller and simpler pieces.
SemaphoreWorkerSleepStrategy::notify{All, Many}
is could actually be faster
because it can now use the semaphores notify_many
function instead of
calling notifyInternal multiple times.