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

Support to async runs of scripts upon typing #55

Open
moretticb opened this issue Jan 7, 2025 · 1 comment
Open

Support to async runs of scripts upon typing #55

moretticb opened this issue Jan 7, 2025 · 1 comment

Comments

@moretticb
Copy link
Contributor

Script runs implemented in #53 are synchronous, and hence blocking. Support to async calls would be a nice feature to have to improve user experience.

@moretticb
Copy link
Contributor Author

I'm not sure how to do it, as I'm not experienced in obj-c. An idea I had is to:

  • Run a script in the background after a pause, say, two seconds after last keystroke.
  • Kill any instance of the same script if user continues typing (at some point the pause will happen again, and hence another run)
  • Once a script finishes running, an output can be written to some temp file and a signal be sent to choose.
  • Have choose listen to process signals. Once it intercepts a signal, it reads the output from a temp file and outputs it

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

1 participant