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

Side by Side Diff: base/task_scheduler/scheduler_worker.cc

Issue 2464963002: TaskScheduler: Remove base::ExecutionMode. (Closed)
Patch Set: CR danakj #17 Created 4 years, 1 month 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
« no previous file with comments | « base/task_scheduler/post_task.cc ('k') | base/task_scheduler/scheduler_worker_pool.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/task_scheduler/scheduler_worker.h" 5 #include "base/task_scheduler/scheduler_worker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 29 matching lines...) Expand all
40 40
41 outer_->delegate_->OnMainEntry(outer_); 41 outer_->delegate_->OnMainEntry(outer_);
42 42
43 // A SchedulerWorker starts out waiting for work. 43 // A SchedulerWorker starts out waiting for work.
44 WaitForWork(); 44 WaitForWork();
45 45
46 #if defined(OS_WIN) 46 #if defined(OS_WIN)
47 // This is required as SequencedWorkerPool previously blindly CoInitialized 47 // This is required as SequencedWorkerPool previously blindly CoInitialized
48 // all of its threads. 48 // all of its threads.
49 // TODO: Get rid of this broad COM scope and force tasks that care about a 49 // TODO: Get rid of this broad COM scope and force tasks that care about a
50 // CoInitialized environment to request one (via an upcoming ExecutionMode). 50 // CoInitialized environment to request one (via an upcoming execution
51 // mode).
51 win::ScopedCOMInitializer com_initializer; 52 win::ScopedCOMInitializer com_initializer;
52 #endif 53 #endif
53 54
54 while (!outer_->task_tracker_->IsShutdownComplete() && 55 while (!outer_->task_tracker_->IsShutdownComplete() &&
55 !outer_->should_exit_for_testing_.IsSet()) { 56 !outer_->should_exit_for_testing_.IsSet()) {
56 DCHECK(outer_); 57 DCHECK(outer_);
57 58
58 #if defined(OS_MACOSX) 59 #if defined(OS_MACOSX)
59 mac::ScopedNSAutoreleasePool autorelease_pool; 60 mac::ScopedNSAutoreleasePool autorelease_pool;
60 #endif 61 #endif
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 thread_ = Thread::Create(this); 276 thread_ = Thread::Create(this);
276 } 277 }
277 278
278 void SchedulerWorker::CreateThreadAssertSynchronized() { 279 void SchedulerWorker::CreateThreadAssertSynchronized() {
279 thread_lock_.AssertAcquired(); 280 thread_lock_.AssertAcquired();
280 CreateThread(); 281 CreateThread();
281 } 282 }
282 283
283 } // namespace internal 284 } // namespace internal
284 } // namespace base 285 } // namespace base
OLDNEW
« no previous file with comments | « base/task_scheduler/post_task.cc ('k') | base/task_scheduler/scheduler_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698