Skip to main content

consume_flag

Function consume_flag 

Source
pub(crate) fn consume_flag(flag: &Mutex<bool>) -> bool
Expand description

Atomically check and clear a cross-thread boolean flag. Returns true if the flag was set, clearing it in the process.