mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 15:27:43 +01:00
Make all TCS RunContinuationsAsynchronously
This commit is contained in:
parent
856c198934
commit
1be5cd452d
14 changed files with 33 additions and 23 deletions
|
|
@ -21,7 +21,7 @@ public static class AsyncUtils
|
|||
/// <returns>Returns the first task that completes, according to <see cref="Task.IsCompletedSuccessfully"/>.</returns>
|
||||
public static Task<T> FirstSuccessfulTask<T>(ICollection<Task<T>> tasks)
|
||||
{
|
||||
var tcs = new TaskCompletionSource<T>();
|
||||
var tcs = new TaskCompletionSource<T>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
var remainingTasks = tasks.Count;
|
||||
|
||||
foreach (var task in tasks)
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ internal class DynamicPriorityQueueLoader : IDisposable
|
|||
params IDisposable?[] disposables)
|
||||
: base(basis, cancellationToken, disposables)
|
||||
{
|
||||
this.taskCompletionSource = new();
|
||||
this.taskCompletionSource = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
this.immediateLoadFunction = immediateLoadFunction;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue