mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
parallel foreach + list is not thread safe
This commit is contained in:
parent
92f45567d7
commit
fe5bb1d885
1 changed files with 3 additions and 2 deletions
|
|
@ -31,7 +31,8 @@ namespace Wox.Core.Plugin
|
|||
|
||||
private static void ParsePluginConfigs(IEnumerable<string> directories)
|
||||
{
|
||||
Parallel.ForEach(directories, directory =>
|
||||
// todo use linq when diable plugin is implmented since parallel.foreach + list is not thread saft
|
||||
foreach (var directory in directories)
|
||||
{
|
||||
if (File.Exists(Path.Combine(directory, "NeedDelete.txt")))
|
||||
{
|
||||
|
|
@ -52,7 +53,7 @@ namespace Wox.Core.Plugin
|
|||
PluginMetadatas.Add(metadata);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static PluginMetadata GetPluginMetadata(string pluginDirectory)
|
||||
|
|
|
|||
Loading…
Reference in a new issue