mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-20 14:37:17 +00:00
Merge pull request #610 from LucianoPC/forget-ignored-task
Forget ignored task
This commit is contained in:
@@ -201,6 +201,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
task.Forget();
|
||||||
return UniTask.FromCanceled(cancellationToken);
|
return UniTask.FromCanceled(cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,6 +225,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
task.Forget();
|
||||||
return UniTask.FromCanceled<T>(cancellationToken);
|
return UniTask.FromCanceled<T>(cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user