Program plugin: remove lock

lock is not needed since assignment is atomic
This commit is contained in:
bao-qian
2016-07-21 20:07:23 +01:00
parent bcf43640fa
commit 0816fdf318

View File

@@ -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