sets ConfigureAwait(false) for XmlCacheFilePersister await calls and BackgroundTaskRunner await calls since these are always on background threads, no synchronizing with any context.

This commit is contained in:
Shannon
2015-04-08 17:15:21 +10:00
parent ce81f9b1b1
commit 24dc8309f1
3 changed files with 5 additions and 4 deletions

View File

@@ -133,7 +133,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
LogHelper.Debug<XmlCacheFilePersister>("Run now.");
var doc = _content.XmlContentInternal;
await PersistXmlToFileAsync(doc);
await PersistXmlToFileAsync(doc).ConfigureAwait(false);
}
public bool IsAsync
@@ -161,7 +161,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
// create dir if it is not there, if it's there, this will proceed as normal
Directory.CreateDirectory(directoryName);
await xmlDoc.SaveAsync(_xmlFileName);
await xmlDoc.SaveAsync(_xmlFileName).ConfigureAwait(false);
}
catch (Exception ee)
{