/// <summary> /// Atomically decrements the value of the specified reference. /// </summary> /// <param name="r">The reference.</param> public static void Decrement(this IRef <int> r) { r.Adjust(n => n - 1); }
/// <summary> /// Atomically increments the value of the specified reference. /// </summary> /// <param name="r">The reference.</param> public static void Increment(this IRef <int> r) { r.Adjust(n => n + 1); }