OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/threading/worker_pool.h" | 5 #include "base/threading/worker_pool.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 bool task_is_slow) { | 68 bool task_is_slow) { |
69 PendingTask* pending_task = new PendingTask(from_here, std::move(task)); | 69 PendingTask* pending_task = new PendingTask(from_here, std::move(task)); |
70 return PostTaskInternal(pending_task, task_is_slow); | 70 return PostTaskInternal(pending_task, task_is_slow); |
71 } | 71 } |
72 | 72 |
73 // static | 73 // static |
74 bool WorkerPool::RunsTasksOnCurrentThread() { | 74 bool WorkerPool::RunsTasksOnCurrentThread() { |
75 return GetWorkerPoolRunningOnThisThread()->Get(); | 75 return GetWorkerPoolRunningOnThisThread()->Get(); |
76 } | 76 } |
77 | 77 |
78 bool WorkerPool::RunsTasksInCurrentSequence() { | |
gab
2017/04/18 15:00:33
// static
| |
79 return GetWorkerPoolRunningOnThisThread()->Get(); | |
80 } | |
81 | |
78 } // namespace base | 82 } // namespace base |
OLD | NEW |