src/Pure/System/isabelle_process.scala
changeset 73802 8d9ac6cfc270
parent 73367 77ef8bef0593
child 73803 2141d6c83511
--- a/src/Pure/System/isabelle_process.scala	Fri Jun 04 22:30:17 2021 +0200
+++ b/src/Pure/System/isabelle_process.scala	Fri Jun 04 22:46:11 2021 +0200
@@ -12,7 +12,7 @@
 
 object Isabelle_Process
 {
-  def apply(
+  def start(
     session: Session,
     options: Options,
     sessions_structure: Sessions.Structure,
@@ -39,11 +39,14 @@
       catch { case exn @ ERROR(_) => channel.shutdown(); throw exn }
     process.stdin.close()
 
-    new Isabelle_Process(session, channel, process)
+    val isabelle_process = new Isabelle_Process(session, process)
+    session.start(receiver => new Prover(receiver, session.cache, channel, process))
+
+    isabelle_process
   }
 }
 
-class Isabelle_Process private(session: Session, channel: System_Channel, process: Bash.Process)
+class Isabelle_Process private(session: Session, process: Bash.Process)
 {
   private val startup = Future.promise[String]
   private val terminated = Future.promise[Process_Result]
@@ -62,8 +65,6 @@
       case _ =>
     }
 
-  session.start(receiver => new Prover(receiver, session.cache, channel, process))
-
   def await_startup(): Isabelle_Process =
     startup.join match {
       case "" => this