void (@NotNull ProgressIndicator indicator) { if (myProcessHandler != null) { UIUtil.invokeAndWaitIfNeeded(() -> closeCommunication()); boolean processStopped = myProcessHandler.waitFor(WAIT_BEFORE_FORCED_CLOSE_MILLIS); if (!processStopped) { tryKillProcess(myProcessHandler); } myProcessHandler.waitFor(); } if (rerun) { ModalityUiUtil.invokeLaterIfNeeded(ModalityState.defaultModalityState(), () -> { PydevConsoleRunnerImpl.this.reRun(true, displayName); }); } else { myConsoleListeners.clear(); } if (PyConsoleUtil.isCommandQueueEnabled(myProject)) { myConsoleView.restoreQueueWindow(true); } }