diff rust/hg-core/src/lib.rs @ 52255:65d516db7309

branching: merge stable into default
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 14 Nov 2024 16:45:23 +0100
parents bd8081e9fd62 96b113d22b34
children db065b33fa56
line wrap: on
line diff
--- a/rust/hg-core/src/lib.rs	Mon Oct 21 12:58:40 2024 +0200
+++ b/rust/hg-core/src/lib.rs	Thu Nov 14 16:45:23 2024 +0100
@@ -53,10 +53,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