aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ThirdParty/SmartThreadPool/WorkItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ThirdParty/SmartThreadPool/WorkItem.cs')
-rw-r--r--ThirdParty/SmartThreadPool/WorkItem.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/ThirdParty/SmartThreadPool/WorkItem.cs b/ThirdParty/SmartThreadPool/WorkItem.cs
index 185f10c..edb8ac0 100644
--- a/ThirdParty/SmartThreadPool/WorkItem.cs
+++ b/ThirdParty/SmartThreadPool/WorkItem.cs
@@ -88,7 +88,7 @@ namespace Amib.Threading.Internal
88 private ManualResetEvent _workItemCompleted; 88 private ManualResetEvent _workItemCompleted;
89 89
90 /// <summary> 90 /// <summary>
91 /// A reference count to the _workItemCompleted. 91 /// A reference count to the _workItemCompleted.
92 /// When it reaches to zero _workItemCompleted is Closed 92 /// When it reaches to zero _workItemCompleted is Closed
93 /// </summary> 93 /// </summary>
94 private int _workItemCompletedRefCount; 94 private int _workItemCompletedRefCount;
@@ -114,13 +114,13 @@ namespace Amib.Threading.Internal
114 private event WorkItemStateCallback _workItemCompletedEvent; 114 private event WorkItemStateCallback _workItemCompletedEvent;
115 115
116 /// <summary> 116 /// <summary>
117 /// A reference to an object that indicates whatever the 117 /// A reference to an object that indicates whatever the
118 /// WorkItemsGroup has been canceled 118 /// WorkItemsGroup has been canceled
119 /// </summary> 119 /// </summary>
120 private CanceledWorkItemsGroup _canceledWorkItemsGroup = CanceledWorkItemsGroup.NotCanceledWorkItemsGroup; 120 private CanceledWorkItemsGroup _canceledWorkItemsGroup = CanceledWorkItemsGroup.NotCanceledWorkItemsGroup;
121 121
122 /// <summary> 122 /// <summary>
123 /// A reference to an object that indicates whatever the 123 /// A reference to an object that indicates whatever the
124 /// SmartThreadPool has been canceled 124 /// SmartThreadPool has been canceled
125 /// </summary> 125 /// </summary>
126 private CanceledWorkItemsGroup _canceledSmartThreadPool = CanceledWorkItemsGroup.NotCanceledWorkItemsGroup; 126 private CanceledWorkItemsGroup _canceledSmartThreadPool = CanceledWorkItemsGroup.NotCanceledWorkItemsGroup;
@@ -197,7 +197,7 @@ namespace Amib.Threading.Internal
197 /// <param name="workItemInfo">The WorkItemInfo of te workitem</param> 197 /// <param name="workItemInfo">The WorkItemInfo of te workitem</param>
198 /// <param name="callback">Callback delegate for the callback.</param> 198 /// <param name="callback">Callback delegate for the callback.</param>
199 /// <param name="state">State with which to call the callback delegate.</param> 199 /// <param name="state">State with which to call the callback delegate.</param>
200 /// 200 ///
201 /// We assume that the WorkItem object is created within the thread 201 /// We assume that the WorkItem object is created within the thread
202 /// that meant to run the callback 202 /// that meant to run the callback
203 public WorkItem( 203 public WorkItem(
@@ -402,7 +402,7 @@ namespace Amib.Threading.Internal
402 { 402 {
403 tae.GetHashCode(); 403 tae.GetHashCode();
404 // Check if the work item was cancelled 404 // Check if the work item was cancelled
405 // If we got a ThreadAbortException and the STP is not shutting down, it means the 405 // If we got a ThreadAbortException and the STP is not shutting down, it means the
406 // work items was cancelled. 406 // work items was cancelled.
407 if (!SmartThreadPool.CurrentThreadEntry.AssociatedSmartThreadPool.IsShuttingdown) 407 if (!SmartThreadPool.CurrentThreadEntry.AssociatedSmartThreadPool.IsShuttingdown)
408 { 408 {
@@ -471,7 +471,7 @@ namespace Amib.Threading.Internal
471 /// <param name="waitableResults">Array of work item result objects</param> 471 /// <param name="waitableResults">Array of work item result objects</param>
472 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param> 472 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param>
473 /// <param name="exitContext"> 473 /// <param name="exitContext">
474 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 474 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
475 /// </param> 475 /// </param>
476 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param> 476 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param>
477 /// <returns> 477 /// <returns>
@@ -553,7 +553,7 @@ namespace Amib.Threading.Internal
553 /// <param name="waitableResults">Array of work item result objects</param> 553 /// <param name="waitableResults">Array of work item result objects</param>
554 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param> 554 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param>
555 /// <param name="exitContext"> 555 /// <param name="exitContext">
556 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 556 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
557 /// </param> 557 /// </param>
558 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param> 558 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param>
559 /// <returns> 559 /// <returns>
@@ -734,7 +734,7 @@ namespace Amib.Threading.Internal
734 // so it already signaled its completion. 734 // so it already signaled its completion.
735 //signalComplete = true; 735 //signalComplete = true;
736 } 736 }
737 } 737 }
738 success = true; 738 success = true;
739 break; 739 break;
740 case WorkItemState.Completed: 740 case WorkItemState.Completed:
@@ -856,7 +856,7 @@ namespace Amib.Threading.Internal
856 { 856 {
857 case 0: 857 case 0:
858 // The work item signaled 858 // The work item signaled
859 // Note that the signal could be also as a result of canceling the 859 // Note that the signal could be also as a result of canceling the
860 // work item (not the get result) 860 // work item (not the get result)
861 break; 861 break;
862 case 1: 862 case 1:
@@ -884,7 +884,7 @@ namespace Amib.Threading.Internal
884 } 884 }
885 885
886 /// <summary> 886 /// <summary>
887 /// A wait handle to wait for completion, cancel, or timeout 887 /// A wait handle to wait for completion, cancel, or timeout
888 /// </summary> 888 /// </summary>
889 private WaitHandle GetWaitHandle() 889 private WaitHandle GetWaitHandle()
890 { 890 {