diff options
Diffstat (limited to 'MediaBrowser.Common/Extensions/ProcessExtensions.cs')
| -rw-r--r-- | MediaBrowser.Common/Extensions/ProcessExtensions.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Common/Extensions/ProcessExtensions.cs b/MediaBrowser.Common/Extensions/ProcessExtensions.cs index c74787122..c3a7cb394 100644 --- a/MediaBrowser.Common/Extensions/ProcessExtensions.cs +++ b/MediaBrowser.Common/Extensions/ProcessExtensions.cs @@ -39,8 +39,8 @@ namespace MediaBrowser.Common.Extensions } // Add an event handler for the process exit event - var tcs = new TaskCompletionSource<bool>(); - process.Exited += (sender, args) => tcs.TrySetResult(true); + var tcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously); + process.Exited += (_, _) => tcs.TrySetResult(true); // Return immediately if the process has already exited if (process.HasExitedSafe()) |
