aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-05-04 11:51:28 +0200
committerDaniel <kingdread@gmx.de>2020-05-04 11:51:28 +0200
commit439e3975ec52574851259fbc4aeaa87bcf28c78b (patch)
tree598edc20155efc2682420671afa1014d65a6995b /src
parent0d9c5a67f97af4d2b0fb543e2f1edf00ed0c7552 (diff)
downloadraidgrep-439e3975ec52574851259fbc4aeaa87bcf28c78b.tar.gz
raidgrep-439e3975ec52574851259fbc4aeaa87bcf28c78b.tar.bz2
raidgrep-439e3975ec52574851259fbc4aeaa87bcf28c78b.zip
add a bit more docstring to INTERRUPTED
Diffstat (limited to 'src')
-rw-r--r--src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 0a98c4e..ad35d20 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -227,6 +227,12 @@ impl std::error::Error for InputError {}
/// A flag that indicates whether the current search should be interrupted because the user pressed
/// Crtl-C.
+///
+/// This flag can be set to `true` by signal handlers in order to exit the search as early as
+/// possible. Note that the search won't be exited immediately, as any logs currently in the
+/// process of being parsed will finish to do so.
+///
+/// The flag is automatically reset to `false` by the repl.
static INTERRUPTED: AtomicBool = AtomicBool::new(false);
fn main() {