src/Pure/Concurrent/simple_thread.ML
author wenzelm
Thu, 09 Oct 2008 20:53:13 +0200
changeset 28546 d57bfb44c9e5
parent 28241 de20fccf6509
child 28550 422e9bd169ac
permissions -rw-r--r--
Dummy version of parallel list combinators -- plain sequential evaluation.

(*  Title:      Pure/Concurrent/simple_thread.ML
    ID:         $Id$
    Author:     Makarius

Simplified thread fork interface.
*)

signature SIMPLE_THREAD =
sig
  val fork: bool -> (unit -> unit) -> Thread.thread
end;

structure SimpleThread: SIMPLE_THREAD =
struct

fun fork interrupts body =
  Thread.fork (fn () => exception_trace (fn () => body ()),
    if interrupts then Multithreading.regular_interrupts else Multithreading.no_interrupts);

end;