mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-28 19:39:19 +01:00
Suppress cancelled task exception from bubbling
This commit is contained in:
parent
2c013f39ca
commit
e12563d20f
1 changed files with 2 additions and 0 deletions
|
|
@ -90,6 +90,7 @@ internal class TextureLoadThrottler : IServiceType
|
||||||
if (work.CancellationToken.IsCancellationRequested)
|
if (work.CancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
work.TaskCompletionSource.SetCanceled(work.CancellationToken);
|
work.TaskCompletionSource.SetCanceled(work.CancellationToken);
|
||||||
|
_ = work.TaskCompletionSource.Task.Exception;
|
||||||
this.RelocatePendingWorkItemToEndAndEraseUnsafe(i--);
|
this.RelocatePendingWorkItemToEndAndEraseUnsafe(i--);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -117,6 +118,7 @@ internal class TextureLoadThrottler : IServiceType
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
minWork.TaskCompletionSource.SetException(e);
|
minWork.TaskCompletionSource.SetException(e);
|
||||||
|
_ = minWork.TaskCompletionSource.Task.Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (this.workListLock)
|
lock (this.workListLock)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue