Example #1
0
 public static bool CompareAndSet(ref this double value, double expected, double update)
 => Atomic <double> .Equals(Interlocked.CompareExchange(ref value, update, expected), expected);
Example #2
0
 public static bool CompareAndSet(ref this float value, float expected, float update)
 => Atomic <float> .Equals(Interlocked.CompareExchange(ref value, update, expected), expected);