mirror of https://github.com/Cysharp/UniTask
Merge pull request #115 from IllusionCui/master
[addressable]:fix CancellationToken can't stop UniTask #114pull/121/head
commit
009715c0da
|
@ -152,7 +152,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
completed = true;
|
completed = true;
|
||||||
if (handle.Status == AsyncOperationStatus.Failed)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
|
{
|
||||||
|
core.TrySetCanceled(cancellationToken);
|
||||||
|
}
|
||||||
|
else if (handle.Status == AsyncOperationStatus.Failed)
|
||||||
{
|
{
|
||||||
core.TrySetException(handle.OperationException);
|
core.TrySetException(handle.OperationException);
|
||||||
}
|
}
|
||||||
|
@ -465,7 +469,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
completed = true;
|
completed = true;
|
||||||
if (handle.Status == AsyncOperationStatus.Failed)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
|
{
|
||||||
|
core.TrySetCanceled(cancellationToken);
|
||||||
|
}
|
||||||
|
else if (handle.Status == AsyncOperationStatus.Failed)
|
||||||
{
|
{
|
||||||
core.TrySetException(handle.OperationException);
|
core.TrySetException(handle.OperationException);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue