Search Results for

    Show / Hide Table of Contents

    Class AtomicBoolean

    Implementation of the java.concurrent.util.AtomicBoolean type.

    Uses MemoryBarrier() internally to enforce ordering of writes without any explicit locking. .NET's strong memory on write guarantees might already enforce this ordering, but the addition of the MemoryBarrier guarantees it.

    Inheritance
    object
    AtomicBoolean
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Util
    Assembly: Akka.dll
    Syntax
    public class AtomicBoolean

    Constructors

    | Edit this page View Source

    AtomicBoolean(bool)

    Sets the initial value of this AtomicBoolean to initialValue.

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

    TBD

    Properties

    | Edit this page View Source

    Value

    The current value of this AtomicReference<T>

    Declaration
    public bool Value { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    CompareAndSet(bool, bool)

    If Value equals expected, then set the Value to newValue.

    Declaration
    public bool CompareAndSet(bool expected, bool newValue)
    Parameters
    Type Name Description
    bool expected

    TBD

    bool newValue

    TBD

    Returns
    Type Description
    bool

    true if newValue was set

    | Edit this page View Source

    GetAndSet(bool)

    Atomically sets the Value to newValue and returns the old Value.

    Declaration
    public bool GetAndSet(bool newValue)
    Parameters
    Type Name Description
    bool newValue

    The new value

    Returns
    Type Description
    bool

    The old value

    Operators

    | Edit this page View Source

    implicit operator bool(AtomicBoolean)

    Performs an implicit conversion from AtomicBoolean to bool.

    Declaration
    public static implicit operator bool(AtomicBoolean atomicBoolean)
    Parameters
    Type Name Description
    AtomicBoolean atomicBoolean

    The boolean to convert

    Returns
    Type Description
    bool

    The result of the conversion.

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET