     if(scheduler_) {
       std::unique_lock<std::mutex> lock(schedulerMutex_);
 
-      // wait until thread doing validation is finished
+      // Wait until the thread that wants to do validation is finished.
       pool_.wait_for_one(lock);
 
       scheduler_->update(cost, batch);

            fetchParams(g->params()->vals(), paramsAvg_);
        scheduler_->validate(graphs_);

        // tell other threads to continue work
        pool_.notify_others();
      }
    }

      }

      if(scheduler_->validating()) {
        // Wait with validation until all other threads are done with update.
        // We want to reuse the graphs for validation, so they need to be in
        // a safe state.
        pool_.wait_for_others(lock);

        if(movingAvg_)
