From 30d40769ea0a8edfd43afb448122cfe2cf396b2a Mon Sep 17 00:00:00 2001 From: James Procter Date: Tue, 6 Jun 2023 17:59:35 +0100 Subject: [PATCH] JAL-4160 JAL-4195 wait around until alignFrame calculators are finished before trying to output an image --- src/jalview/workers/AlignCalcManager.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 1.7.10.2