From e8cf5ee0c1be684b7f1293d5b5b6b82ca50f0e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Wed, 19 May 2021 18:59:19 +0800 Subject: [PATCH] Use ConcurrentDictionary to replace Dictionary --- Flow.Launcher/PublicAPIInstance.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index b3f7b8d4fd5..f3403696e05 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -21,6 +21,7 @@ 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 @@ public void LogWarn(string className, string message, [CallerMemberName] string public void LogException(string className, string message, Exception e, [CallerMemberName] string methodName = "") => Log.Exception(className, message, e, methodName); - private readonly Dictionary _pluginJsonStorages = new(); + private readonly ConcurrentDictionary _pluginJsonStorages = new(); public void SavePluginSettings() {