mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-17 21:37: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
|
|
@ -44,7 +44,9 @@ internal static class ServiceManager
|
|||
private static readonly List<Type> LoadedServices = new();
|
||||
#endif
|
||||
|
||||
private static readonly TaskCompletionSource BlockingServicesLoadedTaskCompletionSource = new();
|
||||
private static readonly TaskCompletionSource BlockingServicesLoadedTaskCompletionSource =
|
||||
new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
|
||||
private static readonly CancellationTokenSource UnloadCancellationTokenSource = new();
|
||||
|
||||
private static ManualResetEvent unloadResetEvent = new(false);
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ internal static class Service<T> where T : IServiceType
|
|||
break;
|
||||
}
|
||||
|
||||
instanceTcs = new TaskCompletionSource<T>();
|
||||
instanceTcs = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
instanceTcs.SetException(new UnloadedException());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue