Renamed method AbortOnWorkItemOnCancel to AbortOnWorkItemCancel

This commit is contained in:
Ami Bar
2009-12-25 09:22:19 +02:00
parent 3672bb3673
commit c2278b74bc
3 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -201,12 +201,12 @@ namespace SmartThreadPoolTests
/// 2. Queue work item that takes some time /// 2. Queue work item that takes some time
/// 3. Wait for it to start /// 3. Wait for it to start
/// 4. Cancel the work item (soft) /// 4. Cancel the work item (soft)
/// 5. Call to AbortOnWorkItemOnCancel /// 5. Call to AbortOnWorkItemCancel
/// 5. Wait for the STP to get idle /// 5. Wait for the STP to get idle
/// 6. Make sure nothing ran in the work item after the AbortOnWorkItemOnCancel /// 6. Make sure nothing ran in the work item after the AbortOnWorkItemCancel
/// </summary> /// </summary>
[Test] [Test]
public void CancelInProgressWorkItemSoftWithAbortOnWorkItemOnCancel() public void CancelInProgressWorkItemSoftWithAbortOnWorkItemCancel()
{ {
bool abortFailed = false; bool abortFailed = false;
ManualResetEvent waitToStart = new ManualResetEvent(false); ManualResetEvent waitToStart = new ManualResetEvent(false);
@@ -217,7 +217,7 @@ namespace SmartThreadPoolTests
state => { state => {
waitToStart.Set(); waitToStart.Set();
waitToCancel.WaitOne(); waitToCancel.WaitOne();
SmartThreadPool.AbortOnWorkItemOnCancel(); SmartThreadPool.AbortOnWorkItemCancel();
abortFailed = true; abortFailed = true;
return null; return null;
}); });
+4 -4
View File
@@ -125,12 +125,12 @@ namespace SmartThreadPoolTests
/// 2. Queue work item that takes some time /// 2. Queue work item that takes some time
/// 3. Wait for it to start /// 3. Wait for it to start
/// 4. Cancel the work item (soft) /// 4. Cancel the work item (soft)
/// 5. Call to AbortOnWorkItemOnCancel /// 5. Call to AbortOnWorkItemCancel
/// 5. Wait for the STP to get idle /// 5. Wait for the STP to get idle
/// 6. Make sure nothing ran in the work item after the AbortOnWorkItemOnCancel /// 6. Make sure nothing ran in the work item after the AbortOnWorkItemCancel
/// </summary> /// </summary>
[Test] [Test]
public void TimeoutInProgressWorkItemSoftWithAbortOnWorkItemOnCancel() public void TimeoutInProgressWorkItemSoftWithAbortOnWorkItemCancel()
{ {
bool abortFailed = false; bool abortFailed = false;
ManualResetEvent waitToStart = new ManualResetEvent(false); ManualResetEvent waitToStart = new ManualResetEvent(false);
@@ -143,7 +143,7 @@ namespace SmartThreadPoolTests
{ {
waitToStart.Set(); waitToStart.Set();
Thread.Sleep(1000); Thread.Sleep(1000);
SmartThreadPool.AbortOnWorkItemOnCancel(); SmartThreadPool.AbortOnWorkItemCancel();
abortFailed = true; abortFailed = true;
return null; return null;
}); });
+1 -1
View File
@@ -1347,7 +1347,7 @@ namespace Amib.Threading
/// Checks if the work item has been cancelled, and if yes then abort the thread. /// Checks if the work item has been cancelled, and if yes then abort the thread.
/// Can be used with Cancel and timeout /// Can be used with Cancel and timeout
/// </summary> /// </summary>
public static void AbortOnWorkItemOnCancel() public static void AbortOnWorkItemCancel()
{ {
if (IsWorkItemCanceled) if (IsWorkItemCanceled)
{ {