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

Unified Diff: runtime/bin/eventhandler_linux.cc

Issue 8983017: Start of thread pool implementation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix compilation on Windows Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/eventhandler_linux.cc
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index 478983533c10a2d123b6cb1795db90dfe8709596..4f3276d44e8b39116e557c32071b7e39705926f6 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -370,6 +370,13 @@ void EventHandlerImplementation::StartEventHandler() {
if (result != 0) {
FATAL("Create start event handler thread");
}
+
+ if (Dart_IsVMFlagSet("enable_thread_pool")) {
+ thread_pool.Start();
+ for (int i = 0; i < 100; i++) {
+ thread_pool.InsertTask(i);
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698