minor fix for * JAL-537
authorjprocter <Jim Procter>
Mon, 17 May 2010 16:13:36 +0000 (16:13 +0000)
committerjprocter <Jim Procter>
Mon, 17 May 2010 16:13:36 +0000 (16:13 +0000)
src/jalview/gui/Console.java

index 3be4c8b..acd3dbd 100644 (file)
@@ -247,12 +247,14 @@ public class Console extends WindowAdapter implements WindowListener,
     {
       while (Thread.currentThread() == reader)
       {
-        try
+        if (pin.available()==0) 
+          {try
         {
           this.wait(100);
         } catch (InterruptedException ie)
         {
-        }
+        }}
+        
         while (pin.available() != 0)
         {
           String input = this.readLine(pin);
@@ -267,12 +269,14 @@ public class Console extends WindowAdapter implements WindowListener,
 
       while (Thread.currentThread() == reader2)
       {
-        try
+        if (pin2.available()==0) {
+          try
         {
           this.wait(100);
         } catch (InterruptedException ie)
         {
         }
+        }
         while (pin2.available() != 0)
         {
           String input = this.readLine(pin2);