diff --git a/src/UniTask.NetCoreTests/WithCancellationTest.cs b/src/UniTask.NetCoreTests/WithCancellationTest.cs
index 3aeb42a..418b432 100644
--- a/src/UniTask.NetCoreTests/WithCancellationTest.cs
+++ b/src/UniTask.NetCoreTests/WithCancellationTest.cs
@@ -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();
diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs
index c26125a..d330109 100644
--- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs
+++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs
@@ -192,7 +192,7 @@ namespace Cysharp.Threading.Tasks
///
/// Ignore task result when cancel raised first.
///
- public static UniTask IgnoreWhenCanceled(this UniTask task, CancellationToken cancellationToken)
+ public static UniTask AttachExternalCancellation(this UniTask task, CancellationToken cancellationToken)
{
if (!cancellationToken.CanBeCanceled)
{
@@ -209,13 +209,13 @@ namespace Cysharp.Threading.Tasks
return task;
}
- return new UniTask(new IgnoreWhenCanceledSource(task, cancellationToken), 0);
+ return new UniTask(new AttachExternalCancellationSource(task, cancellationToken), 0);
}
///
/// Ignore task result when cancel raised first.
///
- public static UniTask IgnoreWhenCanceled(this UniTask task, CancellationToken cancellationToken)
+ public static UniTask AttachExternalCancellation(this UniTask task, CancellationToken cancellationToken)
{
if (!cancellationToken.CanBeCanceled)
{
@@ -232,10 +232,10 @@ namespace Cysharp.Threading.Tasks
return task;
}
- return new UniTask(new IgnoreWhenCanceledSource(task, cancellationToken), 0);
+ return new UniTask(new AttachExternalCancellationSource(task, cancellationToken), 0);
}
- sealed class IgnoreWhenCanceledSource : IUniTaskSource
+ sealed class AttachExternalCancellationSource : IUniTaskSource
{
static readonly Action