Lines Matching refs:Thread
35 virtual void Run(Thread* self) = 0;
40 explicit FunctionClosure(std::function<void(Thread*)>&& f) : func_(std::move(f)) {} in FunctionClosure()
41 void Run(Thread* self) override { in Run()
46 std::function<void(Thread*)> func_;
65 explicit FunctionTask(std::function<void(Thread*)>&& func) : func_(std::move(func)) {} in FunctionTask()
67 void Run(Thread* self) override { in Run()
72 std::function<void(Thread*)> func_;
89 Thread* GetThread() const { return thread_; } in GetThread()
100 Thread* thread_;
118 void StartWorkers(Thread* self) REQUIRES(!task_queue_lock_);
121 void StopWorkers(Thread* self) REQUIRES(!task_queue_lock_);
125 void AddTask(Thread* self, Task* task) REQUIRES(!task_queue_lock_);
128 void RemoveAllTasks(Thread* self) REQUIRES(!task_queue_lock_);
150 void Wait(Thread* self, bool do_work, bool may_hold_locks) REQUIRES(!task_queue_lock_);
152 size_t GetTaskCount(Thread* self) REQUIRES(!task_queue_lock_);
171 virtual Task* GetTask(Thread* self) REQUIRES(!task_queue_lock_);
174 Task* TryGetTask(Thread* self) REQUIRES(!task_queue_lock_);