Unosquare
    Show / Hide Table of Contents

    Class AtomicDouble

    Fast, atomic double combining interlocked to write value and volatile to read values.

    Inheritance
    Object
    AtomicTypeBase<Double>
    AtomicDouble
    Implements
    IComparable<Double>
    IComparable<AtomicTypeBase<Double>>
    IEquatable<Double>
    IEquatable<AtomicTypeBase<Double>>
    Inherited Members
    AtomicTypeBase<Double>.Value
    AtomicTypeBase<Double>.BackingValue
    AtomicTypeBase<Double>.CompareTo(Object)
    AtomicTypeBase<Double>.CompareTo(Double)
    AtomicTypeBase<Double>.CompareTo(AtomicTypeBase<Double>)
    AtomicTypeBase<Double>.Equals(Object)
    AtomicTypeBase<Double>.GetHashCode()
    AtomicTypeBase<Double>.Equals(AtomicTypeBase<Double>)
    AtomicTypeBase<Double>.Equals(Double)
    Namespace: Swan.Threading
    Syntax
    public sealed class AtomicDouble : AtomicTypeBase<double>, IComparable<double>, IComparable<AtomicTypeBase<double>>, IEquatable<double>, IEquatable<AtomicTypeBase<double>>

    Constructors

    AtomicDouble(Double)

    Initializes a new instance of the AtomicDouble class.

    Declaration
    public AtomicDouble(double initialValue = 0)
    Parameters
    Type Name Description
    Double initialValue

    if set to true [initial value].

    Methods

    FromLong(Int64)

    Converts from a long value to the target type.

    Declaration
    protected override double FromLong(long backingValue)
    Parameters
    Type Name Description
    Int64 backingValue

    The backing value.

    Returns
    Type Description
    Double

    The value converted form a long value.

    Overrides
    Swan.Threading.AtomicTypeBase<System.Double>.FromLong(System.Int64)

    ToLong(Double)

    Converts from the target type to a long value.

    Declaration
    protected override long ToLong(double value)
    Parameters
    Type Name Description
    Double value
    Returns
    Type Description
    Int64

    The value converted to a long value.

    Overrides
    Swan.Threading.AtomicTypeBase<System.Double>.ToLong(System.Double)

    Implements

    IComparable<>
    IComparable<>
    IEquatable<>
    IEquatable<>

    Comments

    Back to top Copyright © 2017-2019 Unosquare