Skip to content

Commit

Permalink
Merge pull request #610 from LucianoPC/forget-ignored-task
Browse files Browse the repository at this point in the history
Forget ignored task
  • Loading branch information
neuecc authored Sep 24, 2024
2 parents 75119ac + e0465c6 commit b63eb8d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public static UniTask AttachExternalCancellation(this UniTask task, Cancellation

if (cancellationToken.IsCancellationRequested)
{
task.Forget();
return UniTask.FromCanceled(cancellationToken);
}

Expand All @@ -224,6 +225,7 @@ public static UniTask<T> AttachExternalCancellation<T>(this UniTask<T> task, Can

if (cancellationToken.IsCancellationRequested)
{
task.Forget();
return UniTask.FromCanceled<T>(cancellationToken);
}

Expand Down

0 comments on commit b63eb8d

Please sign in to comment.