Unosquare
    Show / Hide Table of Contents

    Class AtomicLong

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

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

    Constructors

    AtomicLong(Int64)

    Initializes a new instance of the AtomicLong class.

    Declaration
    public AtomicLong(long initialValue = 0L)
    Parameters
    Type Name Description
    Int64 initialValue

    if set to true [initial value].

    Methods

    FromLong(Int64)

    Converts from a long value to the target type.

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

    The backing value.

    Returns
    Type Description
    Int64

    The value converted form a long value.

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

    ToLong(Int64)

    Converts from the target type to a long value.

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

    The value converted to a long value.

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

    Implements

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

    Comments

    Back to top Copyright © 2017-2019 Unosquare