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

Document when the app exits #446

Open
MrToph opened this issue May 24, 2021 · 5 comments
Open

Document when the app exits #446

MrToph opened this issue May 24, 2021 · 5 comments

Comments

@MrToph
Copy link

MrToph commented May 24, 2021

It's not clear to me when the app exits or what keeps it alive.
I tried the example with the counter that uses setInterval and the app keeps running.
In my code, I'm using some async calls but the app immediately exits.

I couldn't find any documentation regarding what keeps the app alive or how to disable it from exiting.

@vadimdemedes
Copy link
Owner

Can you create a minimal reproduction of the problem you're seeing?

@chrisdrackett
Copy link

I'm also curious how this works. In the base example if I have the counter running the app won't exit, but if I replace it with a Text it does, I'm also unclear what causes the app to keep running or exit.

@mAAdhaTTah
Copy link
Contributor

This is less an Ink-specific thing and more a Node thing. The CLI stays alive as long as there are open tasks/processes for Node to run. Once those complete, it closes. setInternal keeps it alive because it continuously adds new tasks. Depending on what your async calls are doing, they could be the cause of the issue.

@mabasic
Copy link

mabasic commented Feb 10, 2024

I am totally confused here. When running the counter example I can't kill the program even if I use the kill command. I have to close the entire terminal in order for it to stop. WTF

@tuler
Copy link

tuler commented Feb 15, 2024

I'm also having issues with the program not exiting. I wonder what are the tools and strategies to use to find what is the real issue.

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

6 participants