diff Implab.Test/AsyncTests.cs @ 22:5a35900264f5 promises

implemented nonblocking wake singnals processing
author cin
date Wed, 13 Nov 2013 14:03:00 +0400
parents 6a56df4ec59e
children ee04e1fa78da
line wrap: on
line diff
--- a/Implab.Test/AsyncTests.cs	Tue Nov 12 19:52:10 2013 +0400
+++ b/Implab.Test/AsyncTests.cs	Wed Nov 13 14:03:00 2013 +0400
@@ -103,15 +103,15 @@
 
             Assert.AreEqual(5, pool.PoolSize);
 
-            pool.Invoke(() => { Thread.Sleep(1000000); return 10; });
-            pool.Invoke(() => { Thread.Sleep(1000000); return 10; });
-            pool.Invoke(() => { Thread.Sleep(1000000); return 10; });
+            pool.Invoke(() => { Thread.Sleep(100000000); return 10; });
+            pool.Invoke(() => { Thread.Sleep(100000000); return 10; });
+            pool.Invoke(() => { Thread.Sleep(100000000); return 10; });
 
             Assert.AreEqual(5, pool.PoolSize);
 
             for (int i = 0; i < 100; i++)
-                pool.Invoke(() => { Thread.Sleep(1000000); return 10; });
-            Thread.Sleep(100);
+                pool.Invoke(() => { Thread.Sleep(100000000); return 10; });
+            Thread.Sleep(200);
             Assert.AreEqual(10, pool.PoolSize);
 
             pool.Dispose();
@@ -244,7 +244,7 @@
         [TestMethod]
         public void ChainedMapTest() {
 
-            using (var pool = new WorkerPool(0,100,1)) {
+            using (var pool = new WorkerPool(4,4,0)) {
                 int count = 10000;
 
                 double[] args = new double[count];