src/Pure/Concurrent/synchronized.ML
changeset 64276 622f4e4ac388
parent 62923 3a122e1e352a
child 68597 afa7c5a239e6
equal deleted inserted replaced
64275:ac2abc987cf9 64276:622f4e4ac388
    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 () =>