From 85b018869e58c967524e6ac682ba94a1f201ca7d Mon Sep 17 00:00:00 2001 From: Chomp Date: Mon, 3 Feb 2025 11:25:20 +0000 Subject: [PATCH] Improved concurrency issues with multithreaded bot gen --- Libraries/Core/Services/MatchBotDetailsCacheService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/Core/Services/MatchBotDetailsCacheService.cs b/Libraries/Core/Services/MatchBotDetailsCacheService.cs index 7157bc0d..7dff51ab 100644 --- a/Libraries/Core/Services/MatchBotDetailsCacheService.cs +++ b/Libraries/Core/Services/MatchBotDetailsCacheService.cs @@ -1,3 +1,4 @@ +using System.Collections.Concurrent; using SptCommon.Annotations; using Core.Models.Eft.Common.Tables; using Core.Models.Utils; @@ -10,7 +11,7 @@ public class MatchBotDetailsCacheService( LocalisationService _localisationService ) { - protected Dictionary _botDetailsCache = new(); + protected ConcurrentDictionary _botDetailsCache = new(); public void CacheBot(BotBase botToCache) {