equal
deleted
inserted
replaced
44 let |
44 let |
45 fun try_change () = |
45 fun try_change () = |
46 let val x = ! var in |
46 let val x = ! var in |
47 (case f x of |
47 (case f x of |
48 NONE => |
48 NONE => |
49 (case Multithreading.sync_wait NONE (time_limit x) cond lock of |
49 (case Multithreading.sync_wait (time_limit x) cond lock of |
50 Exn.Res true => try_change () |
50 Exn.Res true => try_change () |
51 | Exn.Res false => NONE |
51 | Exn.Res false => NONE |
52 | Exn.Exn exn => Exn.reraise exn) |
52 | Exn.Exn exn => Exn.reraise exn) |
53 | SOME (y, x') => |
53 | SOME (y, x') => |
54 Thread_Attributes.uninterruptible (fn _ => fn () => |
54 Thread_Attributes.uninterruptible (fn _ => fn () => |