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

Need to exit the program even when certain async ops are still reamianing #3694

Closed
kt3k opened this issue Jan 17, 2020 · 2 comments
Closed

Comments

@kt3k
Copy link
Member

kt3k commented Jan 17, 2020

Deno now doesn't exit when it has unfinished async ops. However I think that's inconvenient (or inappropriate) for certain types of ops.

For example, in #3610, I want the program to exit even when the user is still listening to the signals, but that's impossible to implement with the current core structure because when the user is listening to signals, there're async ops remaining and that blocks the program to exit.

I suggest we should enhance deno_core::Op::Async struct to have the additional flag for expressing whether it blocks the program to exit or not, and make it possbile to choose to block or not for each op.

@kevinkassimo
Copy link
Contributor

I think this goes back to the thing I did back in #2735 (AsyncOptional). TBH I still do not fully understand why the solution was considered a non-option...

@bartlomieju
Copy link
Member

Closed in #3721

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

Successfully merging a pull request may close this issue.

3 participants