84 while (!f.isReady()) {
115 std::queue<Func> funcs;
116 std::priority_queue<ScheduledFunc> scheduled_funcs;
124 return funcs.size() + scheduled_funcs.size();
140 static size_t seq = 0;
147 if (time == b.
time) {
150 return time > b.
time;
void makeProgress()
Wait for work to do, and do it.
std::queue< Func > funcs_
std::chrono::steady_clock::time_point TimePoint
void scheduleAt(Func &&f, TimePoint const &t) override
constexpr detail::Map< Move > move
void waitFor(F const &f)
makeProgress until this Future is ready.
bool post()
Silently saturates if value is already 2^32-1.
Gen seq(Value first, Value last)
—— Concurrent Priority Queue Implementation ——
void advance(Duration const &dur)
void wait()
Wait for work to do.
std::chrono::microseconds Duration
void drive() override
Implements DrivableExecutor.
auto lock(Synchronized< D, M > &synchronized, Args &&...args)
void advanceTo(TimePoint const &t)
TimePoint now() override
Get this executor's notion of time. Must be threadsafe.
Func && moveOutFunc() const
bool operator<(ScheduledFunc const &b) const
ScheduledFunc(TimePoint const &t, Func &&f)
std::priority_queue< ScheduledFunc > scheduledFuncs_