ForgeDocs
Documentation for the forge framework
|
Thread-safe activation trigger that only activates once. More...
Public Member Functions | |
AtomicActivation () | |
Initializes a new instance of the AtomicActivation class in an unactivated state. More... | |
void | Reset () |
Resets the activation state, so that Activate() will return true on then next call. More... | |
bool | TryActivate () |
Returns true if the activation state was previously unactivated. More... | |
Properties | |
bool | IsActivated [get] |
Returns true if the current activation state is activated. More... | |
Thread-safe activation trigger that only activates once.
In a sense, this is equivalent to extending Interlocked to operate on booleans.
Forge.Utilities.AtomicActivation.AtomicActivation | ( | ) |
Initializes a new instance of the AtomicActivation class in an unactivated state.
void Forge.Utilities.AtomicActivation.Reset | ( | ) |
Resets the activation state, so that Activate() will return true on then next call.
bool Forge.Utilities.AtomicActivation.TryActivate | ( | ) |
Returns true if the activation state was previously unactivated.
|
get |
Returns true if the current activation state is activated.