C# Class 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.
Afficher le fichier Open project: rogeralsing/akka.net Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

AtomicBoolean() public méthode

Sets the initial value of this AtomicBoolean to initialValue.
public AtomicBoolean ( bool initialValue = false ) : System.Threading
initialValue bool
Résultat System.Threading

CompareAndSet() public méthode

If Value equals expected, then set the Value to newValue.
public CompareAndSet ( bool expected, bool newValue ) : bool
expected bool
newValue bool
Résultat bool