summaryrefslogtreecommitdiffstats
path: root/src/repl/abort.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/repl/abort.rs')
-rw-r--r--src/repl/abort.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/repl/abort.rs b/src/repl/abort.rs
index f76abb6..af58b35 100644
--- a/src/repl/abort.rs
+++ b/src/repl/abort.rs
@@ -3,15 +3,19 @@ use std::sync::{
Arc,
};
-pub type SharedAbortSignal = Arc<AbortSignal>;
+pub type AbortSignal = Arc<AbortSignalInner>;
-pub struct AbortSignal {
+pub struct AbortSignalInner {
ctrlc: AtomicBool,
ctrld: AtomicBool,
}
-impl AbortSignal {
- pub fn new() -> SharedAbortSignal {
+pub fn create_abort_signal() -> AbortSignal {
+ AbortSignalInner::new()
+}
+
+impl AbortSignalInner {
+ pub fn new() -> AbortSignal {
Arc::new(Self {
ctrlc: AtomicBool::new(false),
ctrld: AtomicBool::new(false),