Thread pool changes
Make one global thread pool instead of a thread pool for each
eventhandler (i.e. isolate).
Also:
* Added handler function for thread pool tasks.
* Added thread pool shutdown.
* Added a simple test.
R=ager@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//9112013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3079 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index b70226f..fa40b24 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -11,6 +11,7 @@
#include "bin/builtin.h"
#include "bin/dartutils.h"
+#include "bin/eventhandler.h"
#include "bin/file.h"
#include "bin/platform.h"
@@ -381,6 +382,9 @@
Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
+ // Initialize event handler.
+ EventHandler::Initialize();
+
// Initialize the Dart VM.
Dart_Initialize(CreateIsolateAndSetup, NULL);
@@ -504,5 +508,8 @@
DumpPprofSymbolInfo();
// Shutdown the isolate.
Dart_ShutdownIsolate();
+ // Terminate event handler.
+ EventHandler::Terminate();
+
return 0;
}