void () { ApplicationManager.getApplication().executeOnPooledThread(() -> { try { runnable.run(); } catch (Throwable e) { addException(e); } finally { //noinspection SSBasedInspection SwingUtilities.invokeLater(session::resume); } }); }