mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 00:45:43 +08:00
Fixed bug in tests that allowed for ConcurrentModificationException
This commit is contained in:
@@ -15,8 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.util;
|
package ghidra.util;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
import ghidra.util.task.Task;
|
import ghidra.util.task.Task;
|
||||||
import ghidra.util.task.TaskMonitor;
|
import ghidra.util.task.TaskMonitor;
|
||||||
@@ -24,7 +26,7 @@ import ghidra.util.task.TaskMonitor;
|
|||||||
public class TaskUtilities {
|
public class TaskUtilities {
|
||||||
|
|
||||||
private static Map<Task, TaskMonitor> runningTasks = new ConcurrentHashMap<>();
|
private static Map<Task, TaskMonitor> runningTasks = new ConcurrentHashMap<>();
|
||||||
private static List<TrackedTaskListener> listeners = new ArrayList<>();
|
private static List<TrackedTaskListener> listeners = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a listener that will be notified when tasks are tracked (when they are added and
|
* Adds a listener that will be notified when tasks are tracked (when they are added and
|
||||||
|
|||||||
Reference in New Issue
Block a user