src/Pure/Concurrent/multithreading.ML
changeset 78715 9506b852ebdf
parent 78650 47d0c333d155
child 78716 97dfba4405e3
equal deleted inserted replaced
78714:eb2255d241da 78715:9506b852ebdf
    94               val timer = Timer.startRealTimer ();
    94               val timer = Timer.startRealTimer ();
    95               val _ = Thread.Mutex.lock lock;
    95               val _ = Thread.Mutex.lock lock;
    96               val time = Timer.checkRealTimer timer;
    96               val time = Timer.checkRealTimer timer;
    97               val _ = tracing_time true time (fn () => name ^ ": locked after " ^ Time.toString time);
    97               val _ = tracing_time true time (fn () => name ^ ": locked after " ^ Time.toString time);
    98             in false end;
    98             in false end;
    99         val result = Exn.capture (restore_attributes e) ();
    99         val result = Exn.capture0 (restore_attributes e) ();
   100         val _ = if immediate then () else tracing 5 (fn () => name ^ ": unlocking ...");
   100         val _ = if immediate then () else tracing 5 (fn () => name ^ ": unlocking ...");
   101         val _ = Thread.Mutex.unlock lock;
   101         val _ = Thread.Mutex.unlock lock;
   102       in result end
   102       in result end
   103     else
   103     else
   104       let
   104       let
   105         val _ = Thread.Mutex.lock lock;
   105         val _ = Thread.Mutex.lock lock;
   106         val result = Exn.capture (restore_attributes e) ();
   106         val result = Exn.capture0 (restore_attributes e) ();
   107         val _ = Thread.Mutex.unlock lock;
   107         val _ = Thread.Mutex.unlock lock;
   108       in result end) ());
   108       in result end) ());
   109 
   109 
   110 end;
   110 end;