Class AtomicDouble
Fast, atomic double combining interlocked to write value and volatile to read values.
Inherited Members
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 |
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<>