/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2014-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <thread>
-#include <folly/Baton.h>
#include <folly/MPMCQueue.h>
#include <folly/executors/DrivableExecutor.h>
+#include <folly/executors/InlineExecutor.h>
+#include <folly/executors/ManualExecutor.h>
#include <folly/futures/Future.h>
-#include <folly/futures/InlineExecutor.h>
-#include <folly/futures/ManualExecutor.h>
#include <folly/portability/GTest.h>
+#include <folly/synchronization/Baton.h>
using namespace folly;
{
t = std::thread([=] {
ManualWaiter eastWaiter(eastExecutor);
- while (!done)
+ while (!done) {
eastWaiter.drive();
+ }
});
}
p.setValue();
});
- while (!done) x.run();
+ while (!done) {
+ x.run();
+ }
t1.join();
t2.join();
}