lib/classes/isabelle/IsabelleDemo.java
changeset 25857 cdbef6152dcc
parent 25660 097f1384e371
equal deleted inserted replaced
25856:890c51553b33 25857:cdbef6152dcc
    31         super(logic);
    31         super(logic);
    32         new Thread (new Runnable () {
    32         new Thread (new Runnable () {
    33             public void run()
    33             public void run()
    34             {
    34             {
    35                 IsabelleProcess.Result result = null;
    35                 IsabelleProcess.Result result = null;
    36                 while (result == null || result.kind != IsabelleProcess.Result.Kind.EXIT) {
    36                 do {
    37                     try {
    37                   try {
    38                         result = results.take();
    38                     result = results.take();
    39                         System.err.println(result.toString());
    39                   } catch (NullPointerException ex) {
    40                     } catch (InterruptedException ex) { }
    40                     result = null;
    41                 }
    41                   } catch (InterruptedException ex) {
       
    42                     result = null;
       
    43                   }
       
    44                   if (result != null)
       
    45                     System.err.println(result.toString());
       
    46                   if (result.kind == IsabelleProcess.Result.Kind.EXIT) {
       
    47                     result = null;
       
    48                   }
       
    49                 } while (result != null);
    42                 System.err.println("Console thread terminated");
    50                 System.err.println("Console thread terminated");
    43             }
    51             }
    44         }).start();
    52         }).start();
    45     }
    53     }
    46     
    54