asynchronous send_stop operation;
authorwenzelm
Sat, 18 Mar 2017 20:30:05 +0100
changeset 65311 08ebdaa34b24
parent 65310 da9f1ef8ef7c
child 65312 34d56ca5b548
asynchronous send_stop operation;
src/Pure/PIDE/session.scala
--- a/src/Pure/PIDE/session.scala	Sat Mar 18 20:24:12 2017 +0100
+++ b/src/Pure/PIDE/session.scala	Sat Mar 18 20:30:05 2017 +0100
@@ -557,7 +557,7 @@
       })
   }
 
-  def stop(): Int =
+  def send_stop()
   {
     val was_ready =
       _phase.guarded_access(phase =>
@@ -567,7 +567,12 @@
           case Session.Inactive => Some((false, post_phase(Session.Terminated(0))))
           case Session.Ready => Some((true, post_phase(Session.Shutdown)))
         })
-    if (was_ready) manager.send_wait(Stop)
+    if (was_ready) manager.send(Stop)
+  }
+
+  def stop(): Int =
+  {
+    send_stop()
     prover.await_reset()
 
     change_parser.shutdown()