Forget ignored task

pull/610/head
Luciano Prestes Cavalcanti 2024-08-19 08:18:57 -03:00
parent 9057452c86
commit e0465c6c2c
1 changed files with 2 additions and 0 deletions

View File

@ -201,6 +201,7 @@ namespace Cysharp.Threading.Tasks
if (cancellationToken.IsCancellationRequested)
{
task.Forget();
return UniTask.FromCanceled(cancellationToken);
}
@ -224,6 +225,7 @@ namespace Cysharp.Threading.Tasks
if (cancellationToken.IsCancellationRequested)
{
task.Forget();
return UniTask.FromCanceled<T>(cancellationToken);
}