From fc606ff5ffc74922bdb5868746e100f143ae74fd Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sun, 4 Oct 2020 18:34:15 +0100 Subject: [PATCH] use concurrent hashmap for thread processor cache --- .../beta/implementation/processors/MultiBatchProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/processors/MultiBatchProcessor.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/processors/MultiBatchProcessor.java index f93fc9865..2e23cf8a6 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/processors/MultiBatchProcessor.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/processors/MultiBatchProcessor.java @@ -12,9 +12,9 @@ import com.sk89q.worldedit.extent.Extent; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashMap; import java.util.List; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Future; import java.util.Map; import java.util.function.Supplier; @@ -22,7 +22,7 @@ import java.util.function.Supplier; public class MultiBatchProcessor implements IBatchProcessor { private IBatchProcessor[] processors; private final LoadingCache, Map> classToThreadIdToFilter = - FaweCache.IMP.createCache((Supplier>) HashMap::new); + FaweCache.IMP.createCache((Supplier>) ConcurrentHashMap::new); public MultiBatchProcessor(IBatchProcessor... processors) { this.processors = processors;