src/Pure/Concurrent/timeout.ML
changeset 71692 f8e52c0152fe
parent 69826 1bea05713dde
child 73387 3b5196dac4c8
equal deleted inserted replaced
71691:d682b4000a77 71692:f8e52c0152fe
    22       val self = Thread.self ();
    22       val self = Thread.self ();
    23       val start = Time.now ();
    23       val start = Time.now ();
    24 
    24 
    25       val request =
    25       val request =
    26         Event_Timer.request {physical = false} (start + timeout)
    26         Event_Timer.request {physical = false} (start + timeout)
    27           (fn () => Standard_Thread.interrupt_unsynchronized self);
    27           (fn () => Isabelle_Thread.interrupt_unsynchronized self);
    28       val result =
    28       val result =
    29         Exn.capture (fn () => Thread_Attributes.with_attributes orig_atts (fn _ => f x)) ();
    29         Exn.capture (fn () => Thread_Attributes.with_attributes orig_atts (fn _ => f x)) ();
    30 
    30 
    31       val stop = Time.now ();
    31       val stop = Time.now ();
    32       val was_timeout = not (Event_Timer.cancel request);
    32       val was_timeout = not (Event_Timer.cancel request);