Unosquare
    Show / Hide Table of Contents

    Class AtomicBoolean

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

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

    Constructors

    AtomicBoolean(Boolean)

    Initializes a new instance of the AtomicBoolean class.

    Declaration
    public AtomicBoolean(bool initialValue = false)
    Parameters
    Type Name Description
    Boolean initialValue

    if set to true [initial value].

    Methods

    FromLong(Int64)

    Converts from a long value to the target type.

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

    The backing value.

    Returns
    Type Description
    Boolean

    The value converted form a long value.

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

    ToLong(Boolean)

    Converts from the target type to a long value.

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

    The value converted to a long value.

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

    Implements

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

    Comments

    Back to top Copyright © 2017-2019 Unosquare