#include <folly/futures/Future.h>
#include <folly/Likely.h>
#include <folly/Singleton.h>
#include <folly/futures/HeapTimekeeper.h>
#include <folly/futures/ThreadWheelTimekeeper.h>
#include <folly/portability/GFlags.h>
FOLLY_GFLAGS_DEFINE_bool(…);
namespace folly {
namespace futures {
namespace detail {
void WithinInterruptHandler::operator()(exception_wrapper const& ew) const { … }
void WithinAfterFutureCallback::operator()(Try<Unit>&& t) { … }
}
SemiFuture<Unit> sleep(HighResDuration dur, Timekeeper* tk) { … }
Future<Unit> sleepUnsafe(HighResDuration dur, Timekeeper* tk) { … }
namespace {
template <typename Ptr>
class FutureWaiter : public fibers::Baton::Waiter { … };
}
SemiFuture<Unit> wait(std::unique_ptr<fibers::Baton> baton) { … }
SemiFuture<Unit> wait(std::shared_ptr<fibers::Baton> baton) { … }
}
namespace detail {
namespace {
Singleton<Timekeeper, TimekeeperSingletonTag> gTimekeeperSingleton(
[]() -> Timekeeper* { … });
}
std::shared_ptr<Timekeeper> getTimekeeperSingleton() { … }
}
#if FOLLY_USE_EXTERN_FUTURE_UNIT
namespace futures {
namespace detail {
template class FutureBase<Unit>;
}
}
template class Future<Unit>;
template class SemiFuture<Unit>;
#endif
}