Пример #1
0
 void Internal.ITreeHandleable.Handle()
 {
     _cancelationRegistration.TryUnregister();
     InvokeAndCatch(1f);
     _retainCounter = 0;
     _canceled      = true;
     MarkOrDispose();
 }
Пример #2
0
 public void InvokeFromPromise(ITraceable owner)
 {
     if (_valueContainer == null)
     {
         // Make sure invocation is still valid in case this is canceled while waiting in the event queue.
         return;
     }
     try
     {
         cancelationRegistration.TryUnregister();
         _callback.Invoke(new ReasonContainer(_valueContainer));
     }
     finally
     {
         _valueContainer.Release();
     }
 }