Skip to content

Commit

Permalink
Forget ignored task
Browse files Browse the repository at this point in the history
  • Loading branch information
LucianoPC committed Aug 19, 2024
1 parent 9057452 commit e0465c6
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 e0465c6

Please sign in to comment.