src/Pure/Concurrent/unsynchronized.ML
changeset 62891 7a11ea5c9626
parent 62818 2733b240bfea
child 62923 3a122e1e352a
equal deleted inserted replaced
62890:728aa05e9433 62891:7a11ea5c9626
    17 
    17 
    18 fun inc i = (i := ! i + (1: int); ! i);
    18 fun inc i = (i := ! i + (1: int); ! i);
    19 fun dec i = (i := ! i - (1: int); ! i);
    19 fun dec i = (i := ! i - (1: int); ! i);
    20 
    20 
    21 fun setmp flag value f x =
    21 fun setmp flag value f x =
    22   uninterruptible (fn restore_attributes => fn () =>
    22   Multithreading.uninterruptible (fn restore_attributes => fn () =>
    23     let
    23     let
    24       val orig_value = ! flag;
    24       val orig_value = ! flag;
    25       val _ = flag := value;
    25       val _ = flag := value;
    26       val result = Exn.capture (restore_attributes f) x;
    26       val result = Exn.capture (restore_attributes f) x;
    27       val _ = flag := orig_value;
    27       val _ = flag := orig_value;