Index: base/threading/sequenced_worker_pool.cc |
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc |
index f98b23d5d6168a818178fe0c2e0a777edd618bd5..b97c5300f61c2334691ba1d9d32073235b19e9ca 100644 |
--- a/base/threading/sequenced_worker_pool.cc |
+++ b/base/threading/sequenced_worker_pool.cc |
@@ -289,6 +289,8 @@ class SequencedWorkerPool::Inner { |
void Shutdown(int max_blocking_tasks_after_shutdown); |
+ bool IsShutdownInProgress(); |
+ |
// Runs the worker loop on the background thread. |
void ThreadLoop(Worker* this_worker); |
@@ -678,6 +680,11 @@ void SequencedWorkerPool::Inner::Shutdown( |
TimeTicks::Now() - shutdown_wait_begin); |
} |
+bool SequencedWorkerPool::Inner::IsShutdownInProgress() { |
+ AutoLock lock(lock_); |
+ return shutdown_called_; |
+} |
+ |
void SequencedWorkerPool::Inner::ThreadLoop(Worker* this_worker) { |
{ |
AutoLock lock(lock_); |
@@ -1236,4 +1243,8 @@ void SequencedWorkerPool::Shutdown(int max_new_blocking_tasks_after_shutdown) { |
inner_->Shutdown(max_new_blocking_tasks_after_shutdown); |
} |
+bool SequencedWorkerPool::IsShutdownInProgress() { |
+ return inner_->IsShutdownInProgress(); |
+} |
+ |
} // namespace base |