equal
deleted
inserted
replaced
23 if interrupts then Multithreading.public_interrupts else Multithreading.no_interrupts; |
23 if interrupts then Multithreading.public_interrupts else Multithreading.no_interrupts; |
24 |
24 |
25 fun fork interrupts body = |
25 fun fork interrupts body = |
26 Thread.fork (fn () => |
26 Thread.fork (fn () => |
27 exception_trace (fn () => |
27 exception_trace (fn () => |
28 body () handle exn => if Exn.is_interrupt exn then () else reraise exn), |
28 body () handle exn => if Exn.is_interrupt exn then () (*sic!*) else reraise exn), |
29 attributes interrupts); |
29 attributes interrupts); |
30 |
30 |
31 fun join thread = |
31 fun join thread = |
32 while Thread.isActive thread |
32 while Thread.isActive thread |
33 do OS.Process.sleep (seconds 0.1); |
33 do OS.Process.sleep (seconds 0.1); |