Provides a boolean value that may be updated and read atomically.
More...
|
| AtomicBoolean (bool initialValue=false) |
| Creates a new atomic boolean instance with either the given value or defaults to false.
|
|
bool | CompareAndSet (bool expect, bool update) |
| Atomically sets the value to the new one if the current value == expected.
|
|
bool | Get () |
| Reads the value of the boolean atomically and returns it.
|
|
void | Set (bool newValue) |
| Performs an atomic write of the boolean value.
|
|
|
static implicit | operator bool (AtomicBoolean atomicBool) |
|
static implicit | operator AtomicBoolean (bool value) |
|
|
bool | Value [get] |
| Read the value of the boolean atomically and return it.
|
|
Provides a boolean value that may be updated and read atomically.
◆ AtomicBoolean()
Apache.Qpid.Proton.Client.Concurrent.AtomicBoolean.AtomicBoolean |
( |
bool |
initialValue = false | ) |
|
|
inline |
Creates a new atomic boolean instance with either the given value or defaults to false.
- Parameters
-
initialValue | The initial value to provide to the boolean |
◆ CompareAndSet()
bool Apache.Qpid.Proton.Client.Concurrent.AtomicBoolean.CompareAndSet |
( |
bool |
expect, |
|
|
bool |
update |
|
) |
| |
|
inline |
Atomically sets the value to the new one if the current value == expected.
- Parameters
-
expect | The value that is expected |
update | The value to assign if the expectation is met. |
- Returns
◆ Get()
bool Apache.Qpid.Proton.Client.Concurrent.AtomicBoolean.Get |
( |
| ) |
|
|
inline |
Reads the value of the boolean atomically and returns it.
- Returns
- The value of the boolean
◆ Set()
void Apache.Qpid.Proton.Client.Concurrent.AtomicBoolean.Set |
( |
bool |
newValue | ) |
|
|
inline |
Performs an atomic write of the boolean value.
- Parameters
-
newValue | The new value to assign to the boolean |
The documentation for this class was generated from the following file:
- src/Proton.Client/Client/Concurrent/AtomicBoolean.cs