Refactoring multithreading

1. ThreadPool -> Task
2. fix deadlock
3. remove unnecessory application.dispatcher.invoke
4. enable non-main thread access to results collection
5. Misc
6. part of #412
This commit is contained in:
bao-qian
2016-05-05 21:15:13 +01:00
parent 923f4ed045
commit d536377329
15 changed files with 146 additions and 140 deletions

View File

@@ -106,7 +106,7 @@ namespace Wox.Infrastructure.Image
img.Freeze();
ImageSources[icon] = img;
}
Task.Factory.StartNew(() =>
Task.Run(() =>
{
Stopwatch.Debug("Preload images from cache", () =>
{