From: James Procter Date: Tue, 6 Jun 2023 16:59:35 +0000 (+0100) Subject: JAL-4160 JAL-4195 wait around until alignFrame calculators are finished before trying... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=30d40769ea0a8edfd43afb448122cfe2cf396b2a;p=jalview.git JAL-4160 JAL-4195 wait around until alignFrame calculators are finished before trying to output an image --- diff --git a/src/jalview/workers/AlignCalcManager.java b/src/jalview/workers/AlignCalcManager.java index 08ef3a2..d81db8c 100644 --- a/src/jalview/workers/AlignCalcManager.java +++ b/src/jalview/workers/AlignCalcManager.java @@ -200,11 +200,20 @@ public class AlignCalcManager implements AlignCalcManagerI @Override public boolean isWorking() { + boolean working=false; synchronized (inProgress) { // System.err.println("isWorking "+hashCode()); - return inProgress.size() > 0; + working |= inProgress.size() > 0; } + synchronized (updating) + { + for (List workers : updating.values()) + { + working |= workers.size() > 0; + } + } + return working; } @Override