mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-16 04:47:45 +01:00
Make all TCS RunContinuationsAsynchronously
This commit is contained in:
parent
856c198934
commit
1be5cd452d
14 changed files with 33 additions and 23 deletions
|
|
@ -315,7 +315,7 @@ internal class PluginImageCache : IInternalDisposableService
|
|||
|
||||
private Task<T> RunInDownloadQueue<T>(Func<Task<T>> func, ulong requestedFrame)
|
||||
{
|
||||
var tcs = new TaskCompletionSource<T>();
|
||||
var tcs = new TaskCompletionSource<T>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
this.downloadQueue.Add(Tuple.Create(requestedFrame, async () =>
|
||||
{
|
||||
try
|
||||
|
|
@ -332,7 +332,7 @@ internal class PluginImageCache : IInternalDisposableService
|
|||
|
||||
private Task<T> RunInLoadQueue<T>(Func<Task<T>> func)
|
||||
{
|
||||
var tcs = new TaskCompletionSource<T>();
|
||||
var tcs = new TaskCompletionSource<T>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
this.loadQueue.Add(async () =>
|
||||
{
|
||||
try
|
||||
|
|
|
|||
|
|
@ -3774,7 +3774,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
this.errorModalMessage = message;
|
||||
this.errorModalDrawing = true;
|
||||
this.errorModalOnNextFrame = true;
|
||||
this.errorModalTaskCompletionSource = new TaskCompletionSource();
|
||||
this.errorModalTaskCompletionSource = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
return this.errorModalTaskCompletionSource.Task;
|
||||
}
|
||||
|
||||
|
|
@ -3782,7 +3782,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
{
|
||||
this.updateModalOnNextFrame = true;
|
||||
this.updateModalPlugin = plugin;
|
||||
this.updateModalTaskCompletionSource = new TaskCompletionSource<bool>();
|
||||
this.updateModalTaskCompletionSource = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
return this.updateModalTaskCompletionSource.Task;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue