Skip to content

Commit c2278b7

Browse files
committed
Renamed method AbortOnWorkItemOnCancel to AbortOnWorkItemCancel
1 parent 3672bb3 commit c2278b7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

STPTests/TestCancel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ public void CancelInProgressWorkItemSoftWithIgnoreSample()
201201
/// 2. Queue work item that takes some time
202202
/// 3. Wait for it to start
203203
/// 4. Cancel the work item (soft)
204-
/// 5. Call to AbortOnWorkItemOnCancel
204+
/// 5. Call to AbortOnWorkItemCancel
205205
/// 5. Wait for the STP to get idle
206-
/// 6. Make sure nothing ran in the work item after the AbortOnWorkItemOnCancel
206+
/// 6. Make sure nothing ran in the work item after the AbortOnWorkItemCancel
207207
/// </summary>
208208
[Test]
209-
public void CancelInProgressWorkItemSoftWithAbortOnWorkItemOnCancel()
209+
public void CancelInProgressWorkItemSoftWithAbortOnWorkItemCancel()
210210
{
211211
bool abortFailed = false;
212212
ManualResetEvent waitToStart = new ManualResetEvent(false);
@@ -217,7 +217,7 @@ public void CancelInProgressWorkItemSoftWithAbortOnWorkItemOnCancel()
217217
state => {
218218
waitToStart.Set();
219219
waitToCancel.WaitOne();
220-
SmartThreadPool.AbortOnWorkItemOnCancel();
220+
SmartThreadPool.AbortOnWorkItemCancel();
221221
abortFailed = true;
222222
return null;
223223
});

STPTests/TestWorkItemTimeout.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ public void TimeoutCompletedWorkItem()
125125
/// 2. Queue work item that takes some time
126126
/// 3. Wait for it to start
127127
/// 4. Cancel the work item (soft)
128-
/// 5. Call to AbortOnWorkItemOnCancel
128+
/// 5. Call to AbortOnWorkItemCancel
129129
/// 5. Wait for the STP to get idle
130-
/// 6. Make sure nothing ran in the work item after the AbortOnWorkItemOnCancel
130+
/// 6. Make sure nothing ran in the work item after the AbortOnWorkItemCancel
131131
/// </summary>
132132
[Test]
133-
public void TimeoutInProgressWorkItemSoftWithAbortOnWorkItemOnCancel()
133+
public void TimeoutInProgressWorkItemSoftWithAbortOnWorkItemCancel()
134134
{
135135
bool abortFailed = false;
136136
ManualResetEvent waitToStart = new ManualResetEvent(false);
@@ -143,7 +143,7 @@ public void TimeoutInProgressWorkItemSoftWithAbortOnWorkItemOnCancel()
143143
{
144144
waitToStart.Set();
145145
Thread.Sleep(1000);
146-
SmartThreadPool.AbortOnWorkItemOnCancel();
146+
SmartThreadPool.AbortOnWorkItemCancel();
147147
abortFailed = true;
148148
return null;
149149
});

SmartThreadPool/SmartThreadPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ public static bool IsWorkItemCanceled
13471347
/// Checks if the work item has been cancelled, and if yes then abort the thread.
13481348
/// Can be used with Cancel and timeout
13491349
/// </summary>
1350-
public static void AbortOnWorkItemOnCancel()
1350+
public static void AbortOnWorkItemCancel()
13511351
{
13521352
if (IsWorkItemCanceled)
13531353
{

0 commit comments

Comments
 (0)