src/Pure/Concurrent/task_queue.ML
changeset 62923 3a122e1e352a
parent 62891 7a11ea5c9626
child 63806 c54a53ef1873
equal deleted inserted replaced
62922:96691631c1eb 62923:3a122e1e352a
   133   if name = "" then string_of_int id else string_of_int id ^ " (" ^ name ^ ")";
   133   if name = "" then string_of_int id else string_of_int id ^ " (" ^ name ^ ")";
   134 
   134 
   135 fun str_of_task_groups task = str_of_task task ^ " in " ^ str_of_groups (group_of_task task);
   135 fun str_of_task_groups task = str_of_task task ^ " in " ^ str_of_groups (group_of_task task);
   136 
   136 
   137 fun update_timing update (Task {timing, ...}) e =
   137 fun update_timing update (Task {timing, ...}) e =
   138   Multithreading.uninterruptible (fn restore_attributes => fn () =>
   138   Thread_Attributes.uninterruptible (fn restore_attributes => fn () =>
   139     let
   139     let
   140       val start = Time.now ();
   140       val start = Time.now ();
   141       val result = Exn.capture (restore_attributes e) ();
   141       val result = Exn.capture (restore_attributes e) ();
   142       val t = Time.now () - start;
   142       val t = Time.now () - start;
   143       val _ = (case timing of NONE => () | SOME var => Synchronized.change var (update t));
   143       val _ = (case timing of NONE => () | SOME var => Synchronized.change var (update t));