src/Pure/System/scala.scala
changeset 75441 400e325a5416
parent 75440 39011d0d2128
child 75442 d5041b68a237
equal deleted inserted replaced
75440:39011d0d2128 75441:400e325a5416
   206     }
   206     }
   207 
   207 
   208     private def invoke_scala(msg: Prover.Protocol_Output): Boolean = synchronized {
   208     private def invoke_scala(msg: Prover.Protocol_Output): Boolean = synchronized {
   209       msg.properties match {
   209       msg.properties match {
   210         case Markup.Invoke_Scala(name, id) =>
   210         case Markup.Invoke_Scala(name, id) =>
   211           def body: Unit = {
   211           def body(): Unit = {
   212             val (tag, res) = Scala.function_body(name, msg.chunks)
   212             val (tag, res) = Scala.function_body(name, msg.chunks)
   213             result(id, tag, res)
   213             result(id, tag, res)
   214           }
   214           }
   215           val future =
   215           val future =
   216             if (Scala.function_thread(name)) {
   216             if (Scala.function_thread(name)) {
   217               Future.thread(name = Isabelle_Thread.make_name(base = "invoke_scala"))(body)
   217               Future.thread(name = Isabelle_Thread.make_name(base = "invoke_scala"))(body())
   218             }
   218             }
   219             else Future.fork(body)
   219             else Future.fork(body())
   220           futures += (id -> future)
   220           futures += (id -> future)
   221           true
   221           true
   222         case _ => false
   222         case _ => false
   223       }
   223       }
   224     }
   224     }