equal
deleted
inserted
replaced
90 val result = Exn.capture (fn () => |
90 val result = Exn.capture (fn () => |
91 (Thread.setAttributes (safe_interrupts new_atts); f orig_atts x)) (); |
91 (Thread.setAttributes (safe_interrupts new_atts); f orig_atts x)) (); |
92 val _ = Thread.setAttributes orig_atts; |
92 val _ = Thread.setAttributes orig_atts; |
93 in Exn.release result end; |
93 in Exn.release result end; |
94 |
94 |
95 fun interruptible f = with_attributes regular_interrupts (fn _ => f); |
95 fun interruptible f = |
|
96 with_attributes regular_interrupts (fn _ => fn x => f x); |
96 |
97 |
97 fun uninterruptible f = |
98 fun uninterruptible f = |
98 with_attributes no_interrupts (fn atts => f (fn g => with_attributes atts (fn _ => g))); |
99 with_attributes no_interrupts (fn atts => fn x => |
|
100 f (fn g => with_attributes atts (fn _ => fn y => g y)) x); |
99 |
101 |
100 |
102 |
101 (* execution with time limit *) |
103 (* execution with time limit *) |
102 |
104 |
103 structure TimeLimit = |
105 structure TimeLimit = |