From 63c7fb08e0f1aca06fa6dbbeb3d3431e2368b0c9 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 22 Apr 2024 00:46:59 -0400 Subject: [PATCH] Concurrency update --- src/engine/loot/WorkOrder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/loot/WorkOrder.java b/src/engine/loot/WorkOrder.java index 88c67c24..72baeab5 100644 --- a/src/engine/loot/WorkOrder.java +++ b/src/engine/loot/WorkOrder.java @@ -17,7 +17,7 @@ import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.HashMap; -import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Delayed; import java.util.concurrent.TimeUnit; @@ -39,7 +39,7 @@ public class WorkOrder implements Delayed { public long completionTime; public boolean runCompleted = false; public boolean runCanceled = false; - public CopyOnWriteArrayList cooking = new CopyOnWriteArrayList<>(); + public ConcurrentHashMap.KeySetView cooking = ConcurrentHashMap.newKeySet(); public WorkOrder() {