From 832da133d820a5886904e7ea6480dfa029d6f5e8 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Sat, 22 Jan 2022 17:06:57 +0100 Subject: Always create TaskCompletionSource with TaskCreationOptions.RunContinuationsAsynchronously --- MediaBrowser.Common/Extensions/ProcessExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MediaBrowser.Common/Extensions/ProcessExtensions.cs') diff --git a/MediaBrowser.Common/Extensions/ProcessExtensions.cs b/MediaBrowser.Common/Extensions/ProcessExtensions.cs index 08e01bfd6..c3a7cb394 100644 --- a/MediaBrowser.Common/Extensions/ProcessExtensions.cs +++ b/MediaBrowser.Common/Extensions/ProcessExtensions.cs @@ -39,7 +39,7 @@ namespace MediaBrowser.Common.Extensions } // Add an event handler for the process exit event - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); process.Exited += (_, _) => tcs.TrySetResult(true); // Return immediately if the process has already exited -- cgit v1.2.3