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

Unified Diff: src/api.cc

Issue 104583003: [platform] Implement a worker pool (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 7 years 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
« no previous file with comments | « no previous file | src/default-platform.h » ('j') | src/libplatform/default-platform.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index aee9e3a469eae454a9fdc7b241142050044a730a..42a003d8ade7c504f107a7ada824d111fc539a31 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -47,6 +47,9 @@
#include "heap-snapshot-generator-inl.h"
#include "icu_util.h"
#include "json-parser.h"
+#ifdef V8_USE_DEFAULT_PLATFORM
+#include "libplatform/default-platform.h"
+#endif
#include "messages.h"
#ifdef COMPRESS_STARTUP_DATA_BZ2
#include "natives.h"
@@ -630,6 +633,11 @@ bool SetResourceConstraints(Isolate* v8_isolate,
}
isolate->set_max_available_threads(constraints->max_available_threads());
+
+#ifdef V8_USE_DEFAULT_PLATFORM
+ i::DefaultPlatform::SetThreadPoolSize(constraints->max_available_threads());
+#endif
+
return true;
}
« no previous file with comments | « no previous file | src/default-platform.h » ('j') | src/libplatform/default-platform.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698