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

[Question] How implement shutdown #54

Closed
galkin opened this issue Apr 5, 2019 · 4 comments
Closed

[Question] How implement shutdown #54

galkin opened this issue Apr 5, 2019 · 4 comments

Comments

@galkin
Copy link

galkin commented Apr 5, 2019

Thank you for awesome package. Some of my command can take more than 3 minutes. Do we have best practice for shutdown the command execution?

@vilicvane
Copy link
Owner

Hi, are those commands synchronous or asynchronous? And who will perform the "shutdown" operation? Ctrl+C or the command itself?

@galkin
Copy link
Author

galkin commented Apr 5, 2019

Hi, are those commands synchronous or asynchronous?

asynchronous with async/await

And who will perform the "shutdown" operation?

User press Ctrl+C, command should graceful shutdown. For example, disconnect from DB, close file, etc.

@vilicvane
Copy link
Owner

I see, currently I don't think there are direct related features implemented by clime. To be honest, I don't think the Promise idea behind clime is suitable for describing this. RxJS might serve this purpose better though.

I think I could add a built-in shim with RxJS support in future versions, the core might need a little bit modification for types.

@galkin
Copy link
Author

galkin commented Mar 17, 2023

closed as clime didn't receive updates for long time

@galkin galkin closed this as completed Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants