diff options
author | Kenneth Hsu <kennethhsu@gmail.com> | 2018-09-20 02:57:17 +0300 |
---|---|---|
committer | Kenneth Hsu <kennethhsu@gmail.com> | 2018-09-20 02:57:17 +0300 |
commit | 1c8bb276b42ffe63ad9840e68aff5681f57b589a (patch) | |
tree | 23a2f6643d215c5fff2d1e860092c2b8676f40b9 /Duplicati/Library/AutoUpdater/UpdaterManager.cs | |
parent | 2228cd76422f21f244db58b2db589f5e4764f634 (diff) |
Allow tasks to complete on any thread when context is irrelevant.
When the code following the await can be executed on any thread, it's
recommended to use ConfigureAwait(false) to avoid unnecessary context
switching and potential deadlocks.
Diffstat (limited to 'Duplicati/Library/AutoUpdater/UpdaterManager.cs')
-rw-r--r-- | Duplicati/Library/AutoUpdater/UpdaterManager.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Duplicati/Library/AutoUpdater/UpdaterManager.cs b/Duplicati/Library/AutoUpdater/UpdaterManager.cs index c2774314e..06d0b455f 100644 --- a/Duplicati/Library/AutoUpdater/UpdaterManager.cs +++ b/Duplicati/Library/AutoUpdater/UpdaterManager.cs @@ -1141,7 +1141,7 @@ namespace Duplicati.Library.AutoUpdater Task.Run(async () => {
var stdin = new StreamReader(Console.OpenStandardInput());
var line = string.Empty;
- while ((line = await stdin.ReadLineAsync()) != null)
+ while ((line = await stdin.ReadLineAsync().ConfigureAwait(false)) != null)
await proc.StandardInput.WriteLineAsync(line);
}),
proc.StandardOutput.BaseStream.CopyToAsync(Console.OpenStandardOutput()),
|