We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've tried to override and create a custom handler to stop the input thread, but It is not called unless there is a console input (Enter).
It'd be great if the direct version can be stopped from another thread.
Something like this:
struct InteractHandler { stop_signal: Weak<()>, } impl interact_prompt::Handler for InteractHandler { fn receive_interaction(&self, intr: interact_prompt::Interaction) -> interact_prompt::Response { log::info!("called only on console input, newline?"); if self.stop_signal.upgrade().is_none() { interact_prompt::Response::Exit } else { match intr { /*interact_prompt::Interaction::Line(string) => { Commands::new().handle_cmd(&string); }*/ _ => {} } interact_prompt::Response::Continue } } }
The text was updated successfully, but these errors were encountered:
da-x
No branches or pull requests
I've tried to override and create a custom handler to stop the input thread, but It is not called unless there is a console input (Enter).
It'd be great if the direct version can be stopped from another thread.
Something like this:
The text was updated successfully, but these errors were encountered: