import jalview.datamodel.AlignmentAnnotation;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Hashtable;
}
synchronized (updating)
{
- for (List<AlignCalcWorkerI> workers : updating.values())
+ Collection<List<AlignCalcWorkerI>> workersLists = updating.values();
+ synchronized (workersLists)
{
- working |= workers.size() > 0;
+ for (List<AlignCalcWorkerI> workers : workersLists)
+ {
+ if (workers!=null)
+ {
+ synchronized (workers) {
+ working |= workers.size() > 0;
+ }
+ }
+ }
}
}
return working;