void () { try { process.waitFor(); } catch(InterruptedException e) { process.destroy(); } finally { try { myParsingThread.join(); } catch(InterruptedException e) { } compilerHandler.processTerminated(); } synchronized (this) { myParsingThread = null; } }