JAL-4217 interruptedExceptions should also break any wait loops
authorJames Procter <j.procter@dundee.ac.uk>
Thu, 6 Jul 2023 15:52:29 +0000 (16:52 +0100)
committerJames Procter <j.procter@dundee.ac.uk>
Thu, 6 Jul 2023 15:52:29 +0000 (16:52 +0100)
src/jalview/bin/Commands.java

index 7f493e0..e77e45d 100644 (file)
@@ -574,15 +574,15 @@ public class Commands
             Console.error("Failed to import and open structure view.");
             continue;
           }
-          while (sv.isBusy())
+          try {
           {
-            try {
+            while (sv.isBusy())
               Thread.sleep(25);
             }
-            catch (Exception x)
-            {
-              
-            }
+          }
+          catch (Exception x)
+          {
+            
           }
 
           String structureImageFilename = ArgParser.getValueFromSubValOrArg(