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

@@ -15,7 +15,7 @@ namespace Wox.Core.Plugin
public const string Python = "python";
public const string PythonExecutable = "pythonw.exe";
public static IEnumerable<PluginPair> CSharpPlugins(IEnumerable<PluginMetadata> source)
public static IEnumerable<PluginPair> CSharpPlugins(List<PluginMetadata> source)
{
var plugins = new List<PluginPair>();
var metadatas = source.Where(o => o.Language.ToUpper() == AllowedLanguage.CSharp);
@@ -63,7 +63,7 @@ namespace Wox.Core.Plugin
return plugins;
}
public static IEnumerable<PluginPair> PythonPlugins(IEnumerable<PluginMetadata> source, string pythonDirecotry)
public static IEnumerable<PluginPair> PythonPlugins(List<PluginMetadata> source, string pythonDirecotry)
{
var metadatas = source.Where(o => o.Language.ToUpper() == AllowedLanguage.Python);
string filename;