a few more async optimizations

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-08-21 22:50:59 -04:00
parent 1c5f728ec2
commit fbf8cc833c
37 changed files with 249 additions and 311 deletions

View File

@@ -86,7 +86,7 @@ namespace MediaBrowser.Controller.IO
await ProcessPathChanges(paths).ConfigureAwait(false);
}
private async Task ProcessPathChanges(IEnumerable<string> paths)
private Task ProcessPathChanges(IEnumerable<string> paths)
{
List<BaseItem> itemsToRefresh = new List<BaseItem>();
@@ -105,11 +105,11 @@ namespace MediaBrowser.Controller.IO
return folder != null && folder.IsRoot;
}))
{
await Kernel.Instance.ReloadRoot().ConfigureAwait(false);
return Kernel.Instance.ReloadRoot();
}
else
{
await Task.WhenAll(itemsToRefresh.Select(i => Kernel.Instance.ReloadItem(i))).ConfigureAwait(false);
return Task.WhenAll(itemsToRefresh.Select(i => Kernel.Instance.ReloadItem(i)));
}
}