DataSharp/Data/Types/Atomic/AtomicDouble.cs
/// <summary>
/// This method atomically adds a <c>delta</c> the value and returns the original value.
/// </summary>
/// <param name="delta">
/// The value to add to the existing value.
/// </param>
/// <returns>
/// The value before adding the delta.
/// </returns>
This method atomically adds a delta
This method atomically adds a delta
public override double GetAndAdd(double delta)
        {
            for (; ; )
            {
                double current = value;
                double next = current + delta;
                if (CompareAndSet(current, next))
                {
                    return current;
                }
            }
        }
public override double GetAndAdd ( double delta ) { for ( ; ; ) { double current = value ; double next = current + delta ; if ( CompareAndSet ( current , next ) ) { return current ; } } }
This method atomically adds a delta
This method atomically adds a delta
The value before adding the delta.
The value before adding the delta .
delta
double
The value to add to the existing value.
The value to add to the existing value .