diff Implab/Parallels/WorkerPool.cs @ 129:471f596b2603 v2

Added SharedLock to synchronization routines
author cin
date Thu, 29 Jan 2015 18:31:06 +0300
parents 2573b562e328
children eb793fbbe4ea
line wrap: on
line diff
--- a/Implab/Parallels/WorkerPool.cs	Thu Jan 29 05:09:31 2015 +0300
+++ b/Implab/Parallels/WorkerPool.cs	Thu Jan 29 18:31:06 2015 +0300
@@ -7,7 +7,7 @@
     public class WorkerPool : DispatchPool<Action> {
 
         AsyncQueue<Action> m_queue = new AsyncQueue<Action>();
-        int m_queueLength = 0;
+        int m_queueLength;
         readonly int m_threshold = 1;
 
         public WorkerPool(int minThreads, int maxThreads, int threshold)
@@ -40,7 +40,7 @@
 
             var lop = TraceContext.Instance.CurrentOperation;
 
-            EnqueueTask(delegate() {
+            EnqueueTask(delegate {
                 TraceContext.Instance.EnterLogicalOperation(lop, false);
                 try {
                     promise.Resolve(task());