A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://dotnet.github.io/dotNext/api/DotNext.Threading.Atomic.Boolean.html below:

Struct Atomic.Boolean | .NEXT

Struct Atomic.Boolean

Represents atomic boolean.

Namespace: DotNext.Threading Assembly: DotNext.dll Syntax
public struct Atomic.Boolean : IEquatable<bool>
Constructors | Edit this page View Source Boolean(bool)

Represents atomic boolean.

Declaration
public Boolean(bool value)
Parameters Type Name Description bool value

Initial value of the atomic boolean.

Properties | Edit this page View Source Value

Gets or sets boolean value in volatile manner.

Declaration
public bool Value { readonly get; set; }
Property Value Methods | Edit this page View Source AccumulateAndGet(bool, Func<bool, bool, bool>)

Atomically updates the current value with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public bool AccumulateAndGet(bool x, Func<bool, bool, bool> accumulator)
Parameters Type Name Description bool x

Accumulator operand.

Func<bool, bool, bool> accumulator

A side-effect-free function of two arguments.

Returns Type Description bool

The updated value.

Remarks | Edit this page View Source AccumulateAndGet<TAccumulator>(bool, TAccumulator)

Atomically updates the current value with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public bool AccumulateAndGet<TAccumulator>(bool x, TAccumulator accumulator) where TAccumulator : ISupplier<bool, bool, bool>
Parameters Type Name Description bool x

Accumulator operand.

TAccumulator accumulator

A side-effect-free function of two arguments.

Returns Type Description bool

The updated value.

Type Parameters Name Description TAccumulator

The type implementing accumulator.

Remarks | Edit this page View Source CompareAndSet(bool, bool)

Atomically sets referenced value to the given updated value if the current value == the expected value.

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

The expected value.

bool update

The new value.

Returns Type Description bool

true if successful. false return indicates that the actual value was not equal to the expected value.

| Edit this page View Source CompareExchange(bool, bool)

Atomically sets referenced value to the given updated value if the current value == the expected value.

Declaration
public bool CompareExchange(bool update, bool expected)
Parameters Type Name Description bool update

The new value.

bool expected

The expected value.

Returns Type Description bool

The original value.

| Edit this page View Source Equals(bool)

Determines whether stored value is equal to value passed as argument.

Declaration
public readonly bool Equals(bool other)
Parameters Type Name Description bool other

Other value to compare.

Returns Type Description bool

true, if stored value is equal to other value; otherwise, false.

| Edit this page View Source Equals(object?)

Determines whether stored value is equal to value as the passed argument.

Declaration
public override readonly bool Equals(object? other)
Parameters Type Name Description object other

Other value to compare.

Returns Type Description bool

true, if stored value is equal to other value; otherwise, false.

Overrides | Edit this page View Source FalseToTrue()

Atomically sets true value if the current value is false.

Declaration
public bool FalseToTrue()
Returns Type Description bool

true if current value is modified successfully; otherwise, false.

| Edit this page View Source GetAndAccumulate(bool, Func<bool, bool, bool>)

Atomically updates the current value with the results of applying the given function to the current and given values, returning the original value.

Declaration
public bool GetAndAccumulate(bool x, Func<bool, bool, bool> accumulator)
Parameters Type Name Description bool x

Accumulator operand.

Func<bool, bool, bool> accumulator

A side-effect-free function of two arguments.

Returns Type Description bool

The original value.

Remarks | Edit this page View Source GetAndAccumulate<TAccumulator>(bool, TAccumulator)

Atomically updates the current value with the results of applying the given function to the current and given values, returning the original value.

Declaration
public bool GetAndAccumulate<TAccumulator>(bool x, TAccumulator accumulator) where TAccumulator : ISupplier<bool, bool, bool>
Parameters Type Name Description bool x

Accumulator operand.

TAccumulator accumulator

A side-effect-free function of two arguments.

Returns Type Description bool

The original value.

Type Parameters Name Description TAccumulator

The type implementing accumulator.

Remarks | Edit this page View Source GetAndNegate()

Negates currently stored value atomically.

Declaration
public bool GetAndNegate()
Returns Type Description bool

The original value before negation.

| Edit this page View Source GetAndSet(bool)

Modifies the current value atomically.

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

A new value to be stored into this container.

Returns Type Description bool

Original value before modification.

| Edit this page View Source GetAndUpdate(Func<bool, bool>)

Atomically updates the stored value with the results of applying the given function, returning the original value.

Declaration
public bool GetAndUpdate(Func<bool, bool> updater)
Parameters Type Name Description Func<bool, bool> updater

A side-effect-free function.

Returns Type Description bool

The original value.

| Edit this page View Source GetAndUpdate<TUpdater>(TUpdater)

Atomically updates the stored value with the results of applying the given function, returning the original value.

Declaration
public bool GetAndUpdate<TUpdater>(TUpdater updater) where TUpdater : ISupplier<bool, bool>
Parameters Type Name Description TUpdater updater

A side-effect-free function.

Returns Type Description bool

The original value.

Type Parameters Name Description TUpdater

The type implementing updater.

| Edit this page View Source GetHashCode()

Computes hash code for the stored value.

Declaration
public override readonly int GetHashCode()
Returns Type Description int

The hash code of the stored boolean value.

Overrides | Edit this page View Source NegateAndGet()

Negates currently stored value atomically.

Declaration
public bool NegateAndGet()
Returns Type Description bool

Negation result.

| Edit this page View Source SetAndGet(bool)

Modifies the current value atomically.

Declaration
public bool SetAndGet(bool update)
Parameters Type Name Description bool update

A new value to be stored into this container.

Returns Type Description bool

A new value passed as argument.

| Edit this page View Source ToString()

Returns stored boolean value in the form of string.

Declaration
public override readonly string ToString()
Returns Type Description string

Textual representation of stored boolean value.

Overrides | Edit this page View Source TrueToFalse()

Atomically sets false value if the current value is true.

Declaration
public bool TrueToFalse()
Returns Type Description bool

true if current value is modified successfully; otherwise, false.

| Edit this page View Source UpdateAndGet(Func<bool, bool>)

Atomically updates the stored value with the results of applying the given function, returning the updated value.

Declaration
public bool UpdateAndGet(Func<bool, bool> updater)
Parameters Type Name Description Func<bool, bool> updater

A side-effect-free function.

Returns Type Description bool

The updated value.

| Edit this page View Source UpdateAndGet<TUpdater>(TUpdater)

Atomically updates the stored value with the results of applying the given function, returning the updated value.

Declaration
public bool UpdateAndGet<TUpdater>(TUpdater updater) where TUpdater : ISupplier<bool, bool>
Parameters Type Name Description TUpdater updater

A side-effect-free function.

Returns Type Description bool

The updated value.

Type Parameters Name Description TUpdater

The type implementing updater.

Implements Extension Methods

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4