Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <teromario@yahoo.com>2017-02-13 16:05:42 +0300
committerGitHub <noreply@github.com>2017-02-13 16:05:42 +0300
commit4f061313b4da31c5b9bff5844b0d1a5faa707bba (patch)
treeb1c3e535dc438a248c71ac41d9b4c3fde50692c7 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop
parent0413426afbfd24395b53196da16886125ca1436a (diff)
Async/await optimizations (#1861)
* [Core] Async/await optimizations Remove async/await where not needed. Add ConfigureAwait for all awaits inside a Task.Run or wherever a method already did it. * [Ide] Async/await optimizations Remove async/await where not needed. Add ConfigureAwait for all awaits inside a Task.Run or wherever a method already did it. * [Core] Add matching assert to Workspace.Build as Clean has one. * [Core] Address feedback to 764e103fdc90288b0f56abafccbf95819b175200 * [Core] Address feedback to 764e103fdc90288b0f56abafccbf95819b175200 * [Core,Ide] Address feedback from PR. * [Core, Ide] Revert async -> non-async conversion for methods which have throw statements. * [Ide] Address feedback from PR.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentFileStorage.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentFileStorage.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentFileStorage.cs
index 06918d9e99..ce3e0d7adb 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentFileStorage.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentFileStorage.cs
@@ -239,8 +239,8 @@ namespace MonoDevelop.Ide.Desktop
// And we batch as many modifications as possible in a 1 second window.
if (recentSaveTask == null) {
recentSaveTask = Task.Run (async () => {
- await Task.Delay (1000);
- await SaveRecentFiles ();
+ await Task.Delay (1000).ConfigureAwait (false);
+ await SaveRecentFiles ().ConfigureAwait (false);
});
}
}
@@ -259,7 +259,7 @@ namespace MonoDevelop.Ide.Desktop
recentSaveTask = null;
}
- using (var fs = await AcquireFileExclusive (filePath)) {
+ using (var fs = await AcquireFileExclusive (filePath).ConfigureAwait (false)) {
var list = ReadStore (fs);
bool modified = false;