Compatibility file for ML systems without multithreading.
authorwenzelm
Tue, 24 Jul 2007 19:44:31 +0200
changeset 23960c07ae96cbfc4
parent 23959 c2e81bcee06b
child 23961 9e7e1e309ebd
Compatibility file for ML systems without multithreading.
src/Pure/ML-Systems/multithreading_dummy.ML
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/Pure/ML-Systems/multithreading_dummy.ML	Tue Jul 24 19:44:31 2007 +0200
     1.3 @@ -0,0 +1,25 @@
     1.4 +(*  Title:      Pure/ML-Systems/multithreading_dummy.ML
     1.5 +    ID:         $Id$
     1.6 +    Author:     Makarius
     1.7 +
     1.8 +Compatibility file for ML systems without multithreading.
     1.9 +*)
    1.10 +
    1.11 +signature MULTITHREADING =
    1.12 +sig
    1.13 +  val number_of_threads: int ref
    1.14 +  val self_critical: unit -> bool
    1.15 +  val CRITICAL: (unit -> 'a) -> 'a
    1.16 +end;
    1.17 +
    1.18 +structure Multithreading: MULTITHREADING =
    1.19 +struct
    1.20 +
    1.21 +val number_of_threads = ref 0;
    1.22 +
    1.23 +fun self_critical () = false;
    1.24 +fun CRITICAL e = e ();
    1.25 +
    1.26 +end;
    1.27 +
    1.28 +val CRITICAL = Multithreading.CRITICAL;