27 #include "glog/logging.h" 57 std::shared_ptr<Task> shared_task;
64 CHECK(insert_result.second) <<
"ScheduleWhenReady called twice";
65 shared_task = insert_result.first->second;
75 if (locker.AwaitWithTimeout([
this]()
REQUIRES(
mutex_) {
return idle_; },
85 std::shared_ptr<Task> task;
88 locker.AwaitWithTimeout(
void NotifyDependenciesCompleted(Task *task) EXCLUDES(mutex_) override
std::map< Task *, std::shared_ptr< Task > > tasks_not_ready_
void SetThreadPool(Task *task)
Duration FromSeconds(const double seconds)
std::weak_ptr< Task > Schedule(std::unique_ptr< Task > task) EXCLUDES(mutex_) override
std::deque< std::shared_ptr< Task > > task_queue_
Mutex::Locker MutexLocker