mirror of https://github.com/Cysharp/UniTask
commit
b63eb8d090
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue