Ghidra is a software reverse engineering (SRE) framework
Changed data structure to avoid thread visibility issue
dragonmacher8aa1853461cf
diff --git a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/job/GraphJobRunner.java b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/job/GraphJobRunner.javaindex df6a6a4914..bc567d30d9 100644--- a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/job/GraphJobRunner.java+++ b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/job/GraphJobRunner.java@@ -4,9 +4,9 @@* Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.* You may obtain a copy of the License at- *+ ** http://www.apache.org/licenses/LICENSE-2.0- *+ ** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.@@ -15,7 +15,9 @@*/package ghidra.graph.job;-import java.util.*;+import java.util.Objects;+import java.util.Queue;+import java.util.concurrent.ConcurrentLinkedQueue;import ghidra.util.Msg;import ghidra.util.SystemUtilities;@@ -50,7 +52,7 @@ import utility.function.Callback;*/public class GraphJobRunner implements GraphJobListener {- private Queue<GraphJob> queue = new LinkedList<>();+ private Queue<GraphJob> queue = new ConcurrentLinkedQueue<>();private GraphJob finalJob;private GraphJob currentJob;@@ -129,7 +131,6 @@ public class GraphJobRunner implements GraphJobListener {public synchronized void dispose() {trace("dispose()");clearAllJobs();- queue = new QueueStub<>();}private synchronized void clearAllJobs() {