This commit is contained in:
neuecc
2021-02-26 18:51:16 +09:00
parent a1a38d0d7c
commit e88e553cc9
2 changed files with 12 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ namespace NetCoreTests
{
CancellationTokenSource cts = new CancellationTokenSource();
var v = await UniTask.Run(() => 10).IgnoreWhenCanceled(cts.Token);
var v = await UniTask.Run(() => 10).AttachExternalCancellation(cts.Token);
v.Should().Be(10);
}
@@ -30,7 +30,7 @@ namespace NetCoreTests
{
await Task.Delay(TimeSpan.FromSeconds(1));
return 10;
}).IgnoreWhenCanceled(cts.Token);
}).AttachExternalCancellation(cts.Token);
cts.Cancel();