pub(crate) fn consume_flag(flag: &Mutex<bool>) -> bool
Atomically check and clear a cross-thread boolean flag. Returns true if the flag was set, clearing it in the process.