diff options
Diffstat (limited to 'runtime/thread_pool.cc')
| -rw-r--r-- | runtime/thread_pool.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/thread_pool.cc b/runtime/thread_pool.cc index dc99044e4e..92ac8452ba 100644 --- a/runtime/thread_pool.cc +++ b/runtime/thread_pool.cc @@ -253,6 +253,11 @@ void ThreadPool::StopWorkers(Thread* self) { started_ = false; } +bool ThreadPool::HasStarted(Thread* self) { + MutexLock mu(self, task_queue_lock_); + return started_; +} + Task* ThreadPool::GetTask(Thread* self) { MutexLock mu(self, task_queue_lock_); while (!IsShuttingDown()) { |