Always create TaskCompletionSource<T> with TaskCreationOptions.RunContinuationsAsynchronously

This commit is contained in:
Bond_009
2022-01-22 17:06:57 +01:00
parent cd675475bc
commit 832da133d8
5 changed files with 6 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ namespace MediaBrowser.Common.Extensions
}
// Add an event handler for the process exit event
var tcs = new TaskCompletionSource<bool>();
var tcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
process.Exited += (_, _) => tcs.TrySetResult(true);
// Return immediately if the process has already exited