# HG changeset patch # User wenzelm # Date 1582648642 -3600 # Node ID c06604896c3db24d08027bfc694532ba0b02d86a # Parent b94053ca8d7795cf5f882f64bc4b0ccc9b3ab0ca more robust shutdown while Isabelle_Process is starting up, e.g. quit after dialog Isabelle version for testing"; diff -r b94053ca8d77 -r c06604896c3d src/Tools/jEdit/src/plugin.scala --- a/src/Tools/jEdit/src/plugin.scala Mon Feb 24 23:17:41 2020 +0100 +++ b/src/Tools/jEdit/src/plugin.scala Tue Feb 25 17:37:22 2020 +0100 @@ -197,7 +197,7 @@ "Isabelle Syslog", GUI.scrollable_text(session.syslog_content())) } - case Session.Ready => + case Session.Ready if !shutting_down.value => init_models() if (!Isabelle.continuous_checking) { @@ -442,6 +442,8 @@ /* start and stop */ + private val shutting_down = Synchronized(false) + override def start() { /* strict initialization */ @@ -475,6 +477,8 @@ Log.log(Log.ERROR, this, exn) } + shutting_down.change(_ => false) + val view = jEdit.getActiveView() if (view != null) init_view(view) } @@ -493,6 +497,8 @@ } exit_models(JEdit_Lib.jedit_buffers().toList) + + shutting_down.change(_ => true) session.stop() file_watcher.shutdown() PIDE.editor.shutdown()