Lines Matching refs:task
101 Task* task = nullptr; in Run() local
103 while ((task = thread_pool_->GetTask(self)) != nullptr) { in Run()
104 task->Run(self); in Run()
105 task->Finalize(); in Run()
132 void ThreadPool::AddTask(Thread* self, Task* task) { in AddTask() argument
134 tasks_.push_back(task); in AddTask()
144 Task* task = nullptr; in RemoveAllTasks() local
145 while ((task = TryGetTask(self)) != nullptr) { in RemoveAllTasks()
146 task->Finalize(); in RemoveAllTasks()
247 Task* task = TryGetTaskLocked(); in GetTask() local
248 if (task != nullptr) { in GetTask()
249 return task; in GetTask()
278 Task* task = tasks_.front(); in TryGetTaskLocked() local
280 return task; in TryGetTaskLocked()
288 Task* task = nullptr; in Wait() local
289 while ((task = TryGetTask(self)) != nullptr) { in Wait()
290 task->Run(self); in Wait()
291 task->Finalize(); in Wait()