Add to the code that I forgot to write

pull/619/head
Kochoyume 2024-09-24 23:58:28 +09:00
parent dfe5ee43c2
commit 06283f0ffb
1 changed files with 9 additions and 0 deletions

View File

@ -241,6 +241,10 @@ namespace Cysharp.Threading.Tasks
{
TryReturn();
}
else
{
TaskTracker.RemoveTracking(this);
}
}
}
@ -461,6 +465,7 @@ namespace Cysharp.Threading.Tasks
result.predicate = predicate;
result.argument = argument;
result.cancellationToken = cancellationToken;
result.cancelImmediately = cancelImmediately;
if (cancelImmediately && cancellationToken.CanBeCanceled)
{
@ -491,6 +496,10 @@ namespace Cysharp.Threading.Tasks
{
TryReturn();
}
else
{
TaskTracker.RemoveTracking(this);
}
}
}