Beispiel #1
0
 private void ReturnToPool()
 {
     if (_token == 0)
     {
         throw new ObjectDisposedException(this.GetType().Name);
     }
     _token = 0;
     if (_stateMachineBox != null)
     {
         _stateMachineBox.Return();
         _stateMachineBox = null;
     }
     _status             = ValueSourceStatus.Pending;
     _continuation       = null;
     _continueWithAction = null;
     _runWithContinue    = false;
     _pool.Push(this);
     Diagnostics.Trace.TraceReturn(this);
 }