Lines Matching refs:self

100   Thread* self = Thread::Current();  in Run()  local
102 thread_pool_->creation_barier_.Pass(self); in Run()
103 while ((task = thread_pool_->GetTask(self)) != nullptr) { in Run()
104 task->Run(self); in Run()
132 void ThreadPool::AddTask(Thread* self, Task* task) { in AddTask() argument
133 MutexLock mu(self, task_queue_lock_); in AddTask()
137 task_queue_condition_.Signal(self); in AddTask()
141 void ThreadPool::RemoveAllTasks(Thread* self) { in RemoveAllTasks() argument
145 while ((task = TryGetTask(self)) != nullptr) { in RemoveAllTasks()
148 MutexLock mu(self, task_queue_lock_); in RemoveAllTasks()
174 Thread* self = Thread::Current(); in CreateThreads() local
176 MutexLock mu(self, task_queue_lock_); in CreateThreads()
179 creation_barier_.Init(self, max_active_workers_); in CreateThreads()
201 Thread* self = Thread::Current(); in DeleteThreads() local
202 MutexLock mu(self, task_queue_lock_); in DeleteThreads()
206 task_queue_condition_.Broadcast(self); in DeleteThreads()
207 completion_condition_.Broadcast(self); in DeleteThreads()
226 void ThreadPool::StartWorkers(Thread* self) { in StartWorkers() argument
227 MutexLock mu(self, task_queue_lock_); in StartWorkers()
229 task_queue_condition_.Broadcast(self); in StartWorkers()
234 void ThreadPool::StopWorkers(Thread* self) { in StopWorkers() argument
235 MutexLock mu(self, task_queue_lock_); in StopWorkers()
239 Task* ThreadPool::GetTask(Thread* self) { in GetTask() argument
240 MutexLock mu(self, task_queue_lock_); in GetTask()
256 completion_condition_.Broadcast(self); in GetTask()
259 task_queue_condition_.Wait(self); in GetTask()
271 Task* ThreadPool::TryGetTask(Thread* self) { in TryGetTask() argument
272 MutexLock mu(self, task_queue_lock_); in TryGetTask()
285 void ThreadPool::Wait(Thread* self, bool do_work, bool may_hold_locks) { in Wait() argument
289 while ((task = TryGetTask(self)) != nullptr) { in Wait()
290 task->Run(self); in Wait()
295 MutexLock mu(self, task_queue_lock_); in Wait()
298 completion_condition_.Wait(self); in Wait()
300 completion_condition_.WaitHoldingLocks(self); in Wait()
305 size_t ThreadPool::GetTaskCount(Thread* self) { in GetTaskCount() argument
306 MutexLock mu(self, task_queue_lock_); in GetTaskCount()