void () { if (myPydevConsoleCommunication != null) { UIUtil.invokeAndWaitIfNeeded(() -> { try { myPydevConsoleCommunication.close(); Thread.sleep(300); } catch (Exception e1) { // Ignore } }); // waiting for REPL communication before destroying process handler } }