Revision: 19519
Author:   [email protected]
Date:     Thu Feb 20 19:32:27 2014 UTC
Log:      Ensure that the worker pool is running if we intend to use it

BUG=none
[email protected]
LOG=n

Review URL: https://codereview.chromium.org/170483002
http://code.google.com/p/v8/source/detail?r=19519

Modified:
 /branches/bleeding_edge/src/libplatform/default-platform.h
 /branches/bleeding_edge/src/v8.cc

=======================================
--- /branches/bleeding_edge/src/libplatform/default-platform.h Fri Dec 20 08:34:42 2013 UTC +++ /branches/bleeding_edge/src/libplatform/default-platform.h Thu Feb 20 19:32:27 2014 UTC
@@ -50,6 +50,8 @@

   void SetThreadPoolSize(int thread_pool_size);

+  void EnsureInitialized();
+
   // v8::Platform implementation.
   virtual void CallOnBackgroundThread(
       Task *task, ExpectedRuntime expected_runtime) V8_OVERRIDE;
@@ -59,8 +61,6 @@
  private:
   static const int kMaxThreadPoolSize = 4;

-  void EnsureInitialized();
-
   Mutex lock_;
   bool initialized_;
   int thread_pool_size_;
=======================================
--- /branches/bleeding_edge/src/v8.cc   Wed Feb 12 22:04:19 2014 UTC
+++ /branches/bleeding_edge/src/v8.cc   Thu Feb 20 19:32:27 2014 UTC
@@ -82,6 +82,8 @@
 #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);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to