--- a/src/Pure/ML-Systems/multithreading_polyml.ML Tue Sep 29 11:48:32 2009 +0200
+++ b/src/Pure/ML-Systems/multithreading_polyml.ML Tue Sep 29 11:49:22 2009 +0200
@@ -31,7 +31,7 @@
val available = true;
-val max_threads = ref 0;
+val max_threads = Unsynchronized.ref 0;
val tested_platform =
let val ml_platform = getenv "ML_PLATFORM"
@@ -114,7 +114,7 @@
(* tracing *)
-val trace = ref 0;
+val trace = Unsynchronized.ref 0;
fun tracing level msg =
if level > ! trace then ()
@@ -148,7 +148,7 @@
fun timeLimit time f x = uninterruptible (fn restore_attributes => fn () =>
let
val worker = Thread.self ();
- val timeout = ref false;
+ val timeout = Unsynchronized.ref false;
val watchdog = Thread.fork (fn () =>
(OS.Process.sleep time; timeout := true; Thread.interrupt worker), []);
@@ -173,7 +173,7 @@
(*result state*)
datatype result = Wait | Signal | Result of int;
- val result = ref Wait;
+ val result = Unsynchronized.ref Wait;
val lock = Mutex.mutex ();
val cond = ConditionVar.conditionVar ();
fun set_result res =
@@ -231,8 +231,8 @@
local
val critical_lock = Mutex.mutex ();
-val critical_thread = ref (NONE: Thread.thread option);
-val critical_name = ref "";
+val critical_thread = Unsynchronized.ref (NONE: Thread.thread option);
+val critical_name = Unsynchronized.ref "";
in
@@ -274,7 +274,7 @@
local
val serial_lock = Mutex.mutex ();
-val serial_count = ref 0;
+val serial_count = Unsynchronized.ref 0;
in