Merge pull request #610 from LucianoPC/forget-ignored-task

Forget ignored task
pull/623/head
Yoshifumi Kawai 2024-09-24 17:14:40 +09:00 committed by GitHub
commit b63eb8d090
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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);
}