mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add locking for thread safety in GetNonGlobalPlugins
Wrap kvp.Value access in a lock when copying to nonGlobalPlugins to prevent race conditions and ensure thread safety during concurrent access.
This commit is contained in:
parent
452e60f3b5
commit
3b771d155d
1 changed files with 4 additions and 1 deletions
|
|
@ -591,7 +591,10 @@ namespace Flow.Launcher.Core.Plugin
|
|||
var nonGlobalPlugins = new Dictionary<string, List<PluginPair>>();
|
||||
foreach (var kvp in _nonGlobalPlugins)
|
||||
{
|
||||
nonGlobalPlugins.Add(kvp.Key, [.. kvp.Value]);
|
||||
lock (kvp.Value)
|
||||
{
|
||||
nonGlobalPlugins.Add(kvp.Key, [.. kvp.Value]);
|
||||
}
|
||||
}
|
||||
return nonGlobalPlugins;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue