BUG=none
R=hpayer@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/
170483002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19519
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
void SetThreadPoolSize(int thread_pool_size);
+ void EnsureInitialized();
+
// v8::Platform implementation.
virtual void CallOnBackgroundThread(
Task *task, ExpectedRuntime expected_runtime) V8_OVERRIDE;
private:
static const int kMaxThreadPoolSize = 4;
- void EnsureInitialized();
-
Mutex lock_;
bool initialized_;
int thread_pool_size_;
#ifdef V8_USE_DEFAULT_PLATFORM
DefaultPlatform* platform = static_cast<DefaultPlatform*>(platform_);
platform->SetThreadPoolSize(isolate->max_available_threads());
+ // We currently only start the threads early, if we know that we'll use them.
+ if (FLAG_job_based_sweeping) platform->EnsureInitialized();
#endif
return isolate->Init(des);