Пример #1
0
 /// <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);
 }
Пример #2
0
 /// <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);
 }