From c2278b74bc92dce1ff82ad6d1d9beb2bbd18bae3 Mon Sep 17 00:00:00 2001 From: Ami Bar Date: Fri, 25 Dec 2009 09:22:19 +0200 Subject: [PATCH] Renamed method AbortOnWorkItemOnCancel to AbortOnWorkItemCancel --- STPTests/TestCancel.cs | 8 ++++---- STPTests/TestWorkItemTimeout.cs | 8 ++++---- SmartThreadPool/SmartThreadPool.cs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/STPTests/TestCancel.cs b/STPTests/TestCancel.cs index a782153..51420f9 100644 --- a/STPTests/TestCancel.cs +++ b/STPTests/TestCancel.cs @@ -201,12 +201,12 @@ namespace SmartThreadPoolTests /// 2. Queue work item that takes some time /// 3. Wait for it to start /// 4. Cancel the work item (soft) - /// 5. Call to AbortOnWorkItemOnCancel + /// 5. Call to AbortOnWorkItemCancel /// 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 /// [Test] - public void CancelInProgressWorkItemSoftWithAbortOnWorkItemOnCancel() + public void CancelInProgressWorkItemSoftWithAbortOnWorkItemCancel() { bool abortFailed = false; ManualResetEvent waitToStart = new ManualResetEvent(false); @@ -217,7 +217,7 @@ namespace SmartThreadPoolTests state => { waitToStart.Set(); waitToCancel.WaitOne(); - SmartThreadPool.AbortOnWorkItemOnCancel(); + SmartThreadPool.AbortOnWorkItemCancel(); abortFailed = true; return null; }); diff --git a/STPTests/TestWorkItemTimeout.cs b/STPTests/TestWorkItemTimeout.cs index 8252341..76b9e9d 100644 --- a/STPTests/TestWorkItemTimeout.cs +++ b/STPTests/TestWorkItemTimeout.cs @@ -125,12 +125,12 @@ namespace SmartThreadPoolTests /// 2. Queue work item that takes some time /// 3. Wait for it to start /// 4. Cancel the work item (soft) - /// 5. Call to AbortOnWorkItemOnCancel + /// 5. Call to AbortOnWorkItemCancel /// 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 /// [Test] - public void TimeoutInProgressWorkItemSoftWithAbortOnWorkItemOnCancel() + public void TimeoutInProgressWorkItemSoftWithAbortOnWorkItemCancel() { bool abortFailed = false; ManualResetEvent waitToStart = new ManualResetEvent(false); @@ -143,7 +143,7 @@ namespace SmartThreadPoolTests { waitToStart.Set(); Thread.Sleep(1000); - SmartThreadPool.AbortOnWorkItemOnCancel(); + SmartThreadPool.AbortOnWorkItemCancel(); abortFailed = true; return null; }); diff --git a/SmartThreadPool/SmartThreadPool.cs b/SmartThreadPool/SmartThreadPool.cs index 58f5e2a..2b0202f 100644 --- a/SmartThreadPool/SmartThreadPool.cs +++ b/SmartThreadPool/SmartThreadPool.cs @@ -1347,7 +1347,7 @@ namespace Amib.Threading /// Checks if the work item has been cancelled, and if yes then abort the thread. /// Can be used with Cancel and timeout /// - public static void AbortOnWorkItemOnCancel() + public static void AbortOnWorkItemCancel() { if (IsWorkItemCanceled) {