Reset() public method

Reset the wait entry so it can be used again
public Reset ( ) : void
return void
Ejemplo n.º 1
0
 /// <summary>
 /// Returns the WaiterEntry of the current thread
 /// </summary>
 /// <returns></returns>
 /// In order to avoid creation and destuction of WaiterEntry
 /// objects each thread has its own WaiterEntry object.
 private WaiterEntry GetThreadWaiterEntry()
 {
     if (null == _waiterEntry)
     {
         _waiterEntry = new WaiterEntry();
     }
     _waiterEntry.Reset();
     return(_waiterEntry);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the WaiterEntry of the current thread
 /// </summary>
 /// <returns></returns>
 /// In order to avoid creation and destuction of WaiterEntry
 /// objects each thread has its own WaiterEntry object.
 private static WaiterEntry GetThreadWaiterEntry()
 {
     if (_waiterEntry == null)
     {
         _waiterEntry = new WaiterEntry();
     }
     else
     {
         _waiterEntry.Reset();
     }
     return(_waiterEntry);
 }