rust/hg-core/src/lib.rs
branchstable
changeset 52213 96b113d22b34
parent 52056 8b7123c8947b
child 52251 65d516db7309
--- a/rust/hg-core/src/lib.rs	Fri Nov 08 17:08:11 2024 +0100
+++ b/rust/hg-core/src/lib.rs	Tue Nov 12 12:52:13 2024 +0100
@@ -46,10 +46,14 @@
     parse_pattern_syntax_kind, read_pattern_file, IgnorePattern,
     PatternFileWarning, PatternSyntax,
 };
-use std::collections::HashMap;
 use std::fmt;
+use std::{collections::HashMap, sync::atomic::AtomicBool};
 use twox_hash::RandomXxHashBuilder64;
 
+/// Used to communicate with threads spawned from code within this crate that
+/// they should stop their work (SIGINT was received).
+pub static INTERRUPT_RECEIVED: AtomicBool = AtomicBool::new(false);
+
 pub type LineNumber = usize;
 
 /// Rust's default hasher is too slow because it tries to prevent collision