*/
#pragma once
-#include <folly/LifoSem.h>
-#include <folly/futures/DrivableExecutor.h>
-#include <folly/futures/ScheduledExecutor.h>
+
+#include <cstdio>
#include <memory>
#include <mutex>
#include <queue>
-#include <cstdio>
+
+#include <folly/LifoSem.h>
+#include <folly/executors/DrivableExecutor.h>
+#include <folly/executors/ScheduledExecutor.h>
namespace folly {
/// A ManualExecutor only does work when you turn the crank, by calling
}
- virtual void scheduleAt(Func&& f, TimePoint const& t) override {
+ void scheduleAt(Func&& f, TimePoint const& t) override {
std::lock_guard<std::mutex> lock(lock_);
scheduledFuncs_.emplace(t, std::move(f));
sem_.post();
bool operator<(ScheduledFunc const& b) const {
// Earlier-scheduled things must be *higher* priority
// in the max-based std::priority_queue
- if (time == b.time)
+ if (time == b.time) {
return ordinal > b.ordinal;
+ }
return time > b.time;
}