mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
simple refactoring
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Wox.Plugin.Program
|
||||
{
|
||||
public class Main : ISettingProvider, IPlugin, IPluginI18n, IContextMenu, ISavable
|
||||
{
|
||||
private static object lockObject = new object();
|
||||
private static readonly object IndexLock = new object();
|
||||
private static List<Program> _programs = new List<Program>();
|
||||
private static List<IProgramSource> _sources = new List<IProgramSource>();
|
||||
private static readonly Dictionary<string, Type> SourceTypes = new Dictionary<string, Type>
|
||||
@@ -96,8 +96,7 @@ namespace Wox.Plugin.Program
|
||||
|
||||
public static void IndexPrograms()
|
||||
{
|
||||
// todo why there is a lock??
|
||||
lock (lockObject)
|
||||
lock (IndexLock)
|
||||
{
|
||||
var sources = DefaultProgramSources();
|
||||
if (_settings.ProgramSources != null &&
|
||||
|
||||
Reference in New Issue
Block a user