src/Pure/PIDE/execution.ML
changeset 56296 5413b6379c0e
parent 56292 1a91a0da65ab
child 56297 3925634718fb
--- a/src/Pure/PIDE/execution.ML	Wed Mar 26 19:42:16 2014 +0100
+++ b/src/Pure/PIDE/execution.ML	Wed Mar 26 20:08:07 2014 +0100
@@ -87,8 +87,11 @@
 (* fork *)
 
 fun status task markups =
-  let val props = Markup.properties [(Markup.taskN, Task_Queue.str_of_task task)]
-  in Output.status (implode (map (Markup.markup_only o props) markups)) end;
+  let
+    val props =
+      if ! Multithreading.trace >= 2
+      then [(Markup.taskN, Task_Queue.str_of_task task)] else [];
+  in Output.status (implode (map (Markup.markup_only o Markup.properties props) markups)) end;
 
 type params = {name: string, pos: Position.T, pri: int};
 
@@ -150,13 +153,7 @@
       if null prints orelse null (tl prints) orelse not (Multithreading.enabled ())
       then List.app (fn {body, ...} => body ()) (rev prints)
       else
-        let
-          val pos = Position.thread_data ();
-          val pri =
-            (case Future.worker_task () of
-              SOME task => Task_Queue.pri_of_task task
-            | NONE => 0);
-        in
+        let val pos = Position.thread_data () in
           List.app (fn {name, pri, body} =>
             ignore (fork {name = name, pos = pos, pri = pri} body)) (rev prints)
         end