bool TryReturn()
 {
     TaskTracker.RemoveTracking(this);
     core.Reset();
     cancellationToken = default;
     return(pool.TryPush(this));
 }
 bool TryReturn()
 {
     TaskTracker.RemoveTracking(this);
     core.Reset();
     currentFrameCount = default;
     delayFrameCount   = default;
     cancellationToken = default;
     return(pool.TryPush(this));
 }
 bool TryReturn()
 {
     TaskTracker.RemoveTracking(this);
     core.Reset();
     delayFrameTimeSpan = default;
     elapsed            = default;
     cancellationToken  = default;
     return(pool.TryPush(this));
 }
 bool TryReturn()
 {
     core.Reset();
     TaskTracker.RemoveTracking(this);
     handle            = default;
     progress          = default;
     cancellationToken = default;
     return(pool.TryPush(this));
 }
 bool TryReturn()
 {
     TaskTracker.RemoveTracking(this);
     core.Reset();
     stopwatch         = default;
     cancellationToken = default;
     externalStop      = false;
     return(pool.TryPush(this));
 }
 internal void MarkHandled()
 {
     if (!handled)
     {
         handled = true;
         core.MarkHandled();
         TaskTracker.RemoveTracking(this);
     }
 }
 public UniTask DisposeAsync()
 {
     if (!isDisposed)
     {
         isDisposed = true;
         TaskTracker.RemoveTracking(this);
         completionSource.TrySetCanceled(cancellationToken);
         parent.triggerEvent.Remove(this);
     }
     return(default);
 bool TryReturn()
 {
     TaskTracker.RemoveTracking(this);
     core.Reset();
     tween.onUpdate       = originalUpdateAction;
     tween.onKill         = null;
     tween                = default;
     cancellationToken    = default;
     originalUpdateAction = default;
     return(pool.TryPush(this));
 }
 bool TryReturn()
 {
     TaskTracker.RemoveTracking(this);
     core.Reset();
     target            = default;
     currentValue      = default;
     monitorFunction   = default;
     equalityComparer  = default;
     cancellationToken = default;
     return(pool.TryPush(this));
 }
示例#10
0
 bool TryReturn()
 {
     TaskTracker.RemoveTracking(this);
     core.Reset();
     cancellationTokenRegistration.Dispose();
     cancellationTokenRegistration = default;
     parent.triggerEvent.Remove(this);
     parent            = null;
     cancellationToken = default;
     return(pool.TryPush(this));
 }
示例#11
0
 public void GetResult(short token)
 {
     try
     {
         TaskTracker.RemoveTracking(this);
         core.GetResult(token);
     }
     finally
     {
         pool.TryReturn(this);
     }
 }
示例#12
0
            public UniTask DisposeAsync()
            {
                if (!isDisposed)
                {
                    isDisposed = true;
                    TaskTracker.RemoveTracking(this);
                    registration1.Dispose();
                    registration2.Dispose();
                    unityEvent.RemoveListener(unityAction);
                }

                return(default);
示例#13
0
 public void SingalCompleted(Exception error)
 {
     if (error != null)
     {
         TaskTracker.RemoveTracking(this);
         core.TrySetException(error);
     }
     else
     {
         TaskTracker.RemoveTracking(this);
         core.TrySetResult(false);
     }
 }
示例#14
0
            public UnityWebRequest GetResult(short token)
            {
                try
                {
                    TaskTracker.RemoveTracking(this);

                    return(core.GetResult(token));
                }
                finally
                {
                    pool.TryReturn(this);
                }
            }
示例#15
0
            public AssetBundle GetResult(short token)
            {
                try
                {
                    TaskTracker.RemoveTracking(this);

                    return(core.GetResult(token));
                }
                finally
                {
                    pool.TryReturn(this);
                }
            }
示例#16
0
 public void Dispose()
 {
     if (!isDisposed)
     {
         isDisposed = true;
         TaskTracker.RemoveTracking(this);
         registration.Dispose();
         if (unityEvent != null)
         {
             unityEvent.RemoveListener(action);
         }
         core.TrySetCanceled(cancellationToken);
     }
 }
示例#17
0
            bool TryReturn()
            {
                TaskTracker.RemoveTracking(this);
                core.Reset();
                tween.onUpdate = originalUpdateAction;

                switch (callbackType)
                {
                case CallbackType.Kill:
                    tween.onKill = originalCompleteAction;
                    break;

                case CallbackType.Complete:
                    tween.onComplete = originalCompleteAction;
                    break;

                case CallbackType.Pause:
                    tween.onPause = originalCompleteAction;
                    break;

                case CallbackType.Play:
                    tween.onPlay = originalCompleteAction;
                    break;

                case CallbackType.Rewind:
                    tween.onRewind = originalCompleteAction;
                    break;

                case CallbackType.StepComplete:
                    tween.onStepComplete = originalCompleteAction;
                    break;

                default:
                    break;
                }

                tween                  = default;
                cancellationToken      = default;
                originalUpdateAction   = default;
                originalCompleteAction = default;
                return(pool.TryPush(this));
            }
示例#18
0
 public void GetResult(short token)
 {
     TaskTracker.RemoveTracking(this);
     core.GetResult(token);
 }
 bool TryReturn()
 {
     TaskTracker.RemoveTracking(this);
     core.Reset();
     return(pool.TryPush(this));
 }
示例#20
0
 public void SingalCancellation(CancellationToken cancellationToken)
 {
     TaskTracker.RemoveTracking(this);
     core.TrySetCanceled(cancellationToken);
 }