return to toplevel from a long running query after receiving Ctrl-C
This commit is contained in:
@@ -46,6 +46,7 @@ use std::io::{stdout, Read, Write};
|
||||
use std::mem;
|
||||
use std::ops::Index;
|
||||
use std::rc::Rc;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
|
||||
use termion::raw::IntoRawMode;
|
||||
|
||||
@@ -54,6 +55,10 @@ pub struct MachinePolicies {
|
||||
cut_policy: Box<CutPolicy>,
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
pub static ref INTERRUPT: AtomicBool = AtomicBool::new(false);
|
||||
}
|
||||
|
||||
impl MachinePolicies {
|
||||
#[inline]
|
||||
fn new() -> Self {
|
||||
|
||||
Reference in New Issue
Block a user