(* threads.sig *) (* non-cooperating threads *) signature THREADS = sig (******************** primitives for programming threads *********************) (* print a string on the standard output; the normal version of print isn't guaranteed to work *) val print : string -> unit (* spawns a new thread that runs the given function and then exits *) val spawn : (unit -> unit) -> unit (*****************************************************************************) (* start the main thread of a program running *) val run : (unit -> unit) -> unit end;