Skip to content
New issue

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

Async abortable handlers #12

Open
rmja opened this issue Apr 11, 2023 · 1 comment
Open

Async abortable handlers #12

rmja opened this issue Apr 11, 2023 · 1 comment

Comments

@rmja
Copy link
Contributor

rmja commented Apr 11, 2023

It would be really useful if the callback registered for a menu item could return a future, and if that future reflected the duration of the command such that the prompt is only shown after the future has completed. It should somehow be possible to abort the running command with e.g. Ctrl+C which should drop the future show the prompt.

@thejpster
Copy link
Member

Async and blocking code isn't really compatible. Feel free to fork the crate as async-menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants