Browse Source

Concurrency update

combat-2
MagicBot 8 months ago
parent
commit
63c7fb08e0
  1. 4
      src/engine/loot/WorkOrder.java

4
src/engine/loot/WorkOrder.java

@ -17,7 +17,7 @@ import java.time.Instant; @@ -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 { @@ -39,7 +39,7 @@ public class WorkOrder implements Delayed {
public long completionTime;
public boolean runCompleted = false;
public boolean runCanceled = false;
public CopyOnWriteArrayList<Item> cooking = new CopyOnWriteArrayList<>();
public ConcurrentHashMap.KeySetView<Item, Boolean> cooking = ConcurrentHashMap.newKeySet();
public WorkOrder() {

Loading…
Cancel
Save