Added support for Silverlight and Mono (And more)

Also added:
* Join, Choice, and Pipe to SmartThreadPool.
* Local performance counters (for Mono, Silverlight, and WindowsCE)
This commit is contained in:
Ami Bar
2009-12-19 17:36:39 +02:00
parent d2c14da5ad
commit 760bc5d1a9
61 changed files with 2960 additions and 969 deletions
+18
View File
@@ -152,5 +152,23 @@ namespace WorkItemsGroupTests
smartThreadPool.Shutdown();
}
[Test]
public void WaitForIdleEvent()
{
SmartThreadPool smartThreadPool = new SmartThreadPool();
IWorkItemsGroup workItemsGroup = smartThreadPool.CreateWorkItemsGroup(1);
ManualResetEvent wigIsIdle = new ManualResetEvent(false);
workItemsGroup.OnIdle += wig => wigIsIdle.Set();
workItemsGroup.QueueWorkItem(() => { });
bool eventFired = wigIsIdle.WaitOne(100, true);
smartThreadPool.Shutdown();
Assert.IsTrue(eventFired);
}
}
}