pub static STOP_SIGNAL: AtomicBool
Expand description
A Boolean flag that utilizes atomic operations to safely manage concurrent access across multiple threads.
This static variable, initialized to false
, provides a thread-safe mechanism to signal stopping or interrupting operations.
It is typically used in scenarios where multiple threads need to be coordinated to end processes gracefully or to check and respond to a halt condition efficiently without data races.
The use of AtomicBool
ensures that checks and updates to this variable are done atomically, maintaining data integrity across concurrent executions.