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

Side by Side Diff: src/cancelable-task.cc

Issue 2613483002: Reland "Use background tasks for the compiler dispatcher (Closed)
Patch Set: fix Created 3 years, 11 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
« no previous file with comments | « src/cancelable-task.h ('k') | src/compiler-dispatcher/compiler-dispatcher.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project 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 "src/cancelable-task.h" 5 #include "src/cancelable-task.h"
6 6
7 #include "src/base/platform/platform.h" 7 #include "src/base/platform/platform.h"
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 cancelable_tasks_.erase(current); 86 cancelable_tasks_.erase(current);
87 } 87 }
88 } 88 }
89 // Wait for already running background tasks. 89 // Wait for already running background tasks.
90 if (!cancelable_tasks_.empty()) { 90 if (!cancelable_tasks_.empty()) {
91 cancelable_tasks_barrier_.Wait(&mutex_); 91 cancelable_tasks_barrier_.Wait(&mutex_);
92 } 92 }
93 } 93 }
94 } 94 }
95 95
96 CancelableTask::CancelableTask(Isolate* isolate)
97 : CancelableTask(isolate, isolate->cancelable_task_manager()) {}
96 98
97 CancelableTask::CancelableTask(Isolate* isolate) 99 CancelableTask::CancelableTask(Isolate* isolate, CancelableTaskManager* manager)
98 : Cancelable(isolate->cancelable_task_manager()), isolate_(isolate) {} 100 : Cancelable(manager), isolate_(isolate) {}
99
100 101
101 CancelableIdleTask::CancelableIdleTask(Isolate* isolate) 102 CancelableIdleTask::CancelableIdleTask(Isolate* isolate)
102 : Cancelable(isolate->cancelable_task_manager()), isolate_(isolate) {} 103 : CancelableIdleTask(isolate, isolate->cancelable_task_manager()) {}
104
105 CancelableIdleTask::CancelableIdleTask(Isolate* isolate,
106 CancelableTaskManager* manager)
107 : Cancelable(manager), isolate_(isolate) {}
103 108
104 } // namespace internal 109 } // namespace internal
105 } // namespace v8 110 } // namespace v8
OLDNEW
« no previous file with comments | « src/cancelable-task.h ('k') | src/compiler-dispatcher/compiler-dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698