equal
deleted
inserted
replaced
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)); |