Merge pull request #445 from Flow-Launcher/fixConcurrentIssue

Dev branch: Use ConcurrentDictionary to replace Dictionary
This commit is contained in:
Jeremy Wu 2021-05-19 23:32:06 +10:00 committed by GitHub
commit a451f789f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,7 @@ using JetBrains.Annotations;
using System.Runtime.CompilerServices;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
using System.Collections.Concurrent;
namespace Flow.Launcher
{
@ -144,7 +145,7 @@ namespace Flow.Launcher
public void LogException(string className, string message, Exception e,
[CallerMemberName] string methodName = "") => Log.Exception(className, message, e, methodName);
private readonly Dictionary<Type, object> _pluginJsonStorages = new();
private readonly ConcurrentDictionary<Type, object> _pluginJsonStorages = new();
public void SavePluginSettings()
{