src/Pure/Concurrent/simple_thread.ML
changeset 53527 9b0af3298cda
parent 52583 0a7240d88e09
child 53709 84522727f9d3
equal deleted inserted replaced
53526:3120c2ce5a75 53527:9b0af3298cda
    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);