tuned signature;
authorwenzelm
Tue, 07 Sep 2021 15:15:13 +0200
changeset 74254 53e1a14e2ef1
parent 74253 45dc9de1bd33
child 74255 e117e0c29204
tuned signature;
src/Pure/Concurrent/consumer_thread.scala
src/Pure/PIDE/session.scala
--- a/src/Pure/Concurrent/consumer_thread.scala	Tue Sep 07 15:10:53 2021 +0200
+++ b/src/Pure/Concurrent/consumer_thread.scala	Tue Sep 07 15:15:13 2021 +0200
@@ -49,7 +49,7 @@
 
   private val thread = Isabelle_Thread.fork(name = name, daemon = daemon) { main_loop(Nil) }
   def is_active(): Boolean = active && thread.isAlive
-  def check_thread: Boolean = Thread.currentThread == thread
+  def check_thread(): Boolean = Thread.currentThread == thread
 
   private def failure(exn: Throwable): Unit =
     Output.error_message(
--- a/src/Pure/PIDE/session.scala	Tue Sep 07 15:10:53 2021 +0200
+++ b/src/Pure/PIDE/session.scala	Tue Sep 07 15:15:13 2021 +0200
@@ -158,25 +158,25 @@
 
   def assert_dispatcher[A](body: => A): A =
   {
-    assert(dispatcher.check_thread)
+    assert(dispatcher.check_thread())
     body
   }
 
   def require_dispatcher[A](body: => A): A =
   {
-    require(dispatcher.check_thread, "not on dispatcher thread")
+    require(dispatcher.check_thread(), "not on dispatcher thread")
     body
   }
 
   def send_dispatcher(body: => Unit): Unit =
   {
-    if (dispatcher.check_thread) body
+    if (dispatcher.check_thread()) body
     else dispatcher.send(() => body)
   }
 
   def send_wait_dispatcher(body: => Unit): Unit =
   {
-    if (dispatcher.check_thread) body
+    if (dispatcher.check_thread()) body
     else dispatcher.send_wait(() => body)
   }