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 57d7f61a0c..b361d16d95 100644 --- a/runtime/thread_pool.cc +++ b/runtime/thread_pool.cc @@ -246,6 +246,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()) { |