diff Implab/Parallels/DispatchPool.cs @ 125:f803565868a4 v2

improved performance of promises
author cin
date Thu, 15 Jan 2015 12:09:20 +0300
parents dc4942d09e74
children
line wrap: on
line diff
--- a/Implab/Parallels/DispatchPool.cs	Thu Jan 15 02:43:14 2015 +0300
+++ b/Implab/Parallels/DispatchPool.cs	Thu Jan 15 12:09:20 2015 +0300
@@ -30,11 +30,9 @@
         }
 
         protected DispatchPool() {
-            int maxThreads, maxCP;
-            ThreadPool.GetMaxThreads(out maxThreads, out maxCP);
 
             m_minThreadsLimit = 0;
-            m_maxThreadsLimit = maxThreads;
+            m_maxThreadsLimit = Environment.ProcessorCount;
         }
 
         protected void InitPool() {