C# Класс Akka.Util.AtomicBoolean

Implementation of the java.concurrent.util.AtomicBoolean type. Uses Interlocked.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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AtomicBoolean ( bool initialValue = false ) : System.Threading

Sets the initial value of this AtomicBoolean to initialValue.

CompareAndSet ( bool expected, bool newValue ) : bool

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

Описание методов

AtomicBoolean() публичный Метод

Sets the initial value of this AtomicBoolean to initialValue.
public AtomicBoolean ( bool initialValue = false ) : System.Threading
initialValue bool
Результат System.Threading

CompareAndSet() публичный Метод

If Value equals expected, then set the Value to newValue.
public CompareAndSet ( bool expected, bool newValue ) : bool
expected bool
newValue bool
Результат bool