Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: base/threading/worker_pool_win.cc

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: remove RunsTasksOnCurrentThread() overrided. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698