mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Program plugin: remove lock
lock is not needed since assignment is atomic
This commit is contained in:
@@ -14,7 +14,6 @@ namespace Wox.Plugin.Program
|
|||||||
{
|
{
|
||||||
public class Main : ISettingProvider, IPlugin, IPluginI18n, IContextMenu, ISavable
|
public class Main : ISettingProvider, IPlugin, IPluginI18n, IContextMenu, ISavable
|
||||||
{
|
{
|
||||||
private static readonly object IndexLock = new object();
|
|
||||||
private static List<Program> _programs = new List<Program>();
|
private static List<Program> _programs = new List<Program>();
|
||||||
|
|
||||||
private PluginInitContext _context;
|
private PluginInitContext _context;
|
||||||
@@ -87,8 +86,6 @@ namespace Wox.Plugin.Program
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void IndexPrograms()
|
public static void IndexPrograms()
|
||||||
{
|
|
||||||
lock (IndexLock)
|
|
||||||
{
|
{
|
||||||
var sources = DefaultProgramSources();
|
var sources = DefaultProgramSources();
|
||||||
if (_settings.ProgramSources != null &&
|
if (_settings.ProgramSources != null &&
|
||||||
@@ -106,7 +103,6 @@ namespace Wox.Plugin.Program
|
|||||||
|
|
||||||
_cache.Programs = _programs;
|
_cache.Programs = _programs;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load program sources that wox always provide
|
/// Load program sources that wox always provide
|
||||||
|
|||||||
Reference in New Issue
Block a user