Only issue wakeup if there is a good reason too.
@@ -89,8 +89,10 @@ SingleExecutor::drain(Lock & lock) {
void
SingleExecutor::wakeup() {
+ if (numTasks() > 0) {
_consumerCondition.notify_one();
}
+}
SingleExecutor &
SingleExecutor::sync() {
