mirror of
https://github.com/farcasclaudiu/SmartThreadPool.git
synced 2026-06-22 11:01:28 +03:00
Added refactorings suggested by Simon Cropp
This commit is contained in:
@@ -15,11 +15,7 @@ namespace SmartThreadPoolTests
|
||||
[Category("TestWaitForIdle")]
|
||||
public class TestWaitForIdle
|
||||
{
|
||||
public TestWaitForIdle()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Example of waiting for idle
|
||||
/// </summary>
|
||||
[Test]
|
||||
@@ -27,7 +23,6 @@ namespace SmartThreadPoolTests
|
||||
{
|
||||
SmartThreadPool smartThreadPool = new SmartThreadPool(10*1000, 25, 0);
|
||||
|
||||
bool success = false;
|
||||
ManualResetEvent isRunning = new ManualResetEvent(false);
|
||||
|
||||
for(int i = 0; i < 4; ++i)
|
||||
@@ -35,7 +30,7 @@ namespace SmartThreadPoolTests
|
||||
smartThreadPool.QueueWorkItem(delegate { isRunning.WaitOne(); });
|
||||
}
|
||||
|
||||
success = !smartThreadPool.WaitForIdle(1000);
|
||||
bool success = !smartThreadPool.WaitForIdle(1000);
|
||||
|
||||
isRunning.Set();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user