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

Allow watch early exit #865

Merged
merged 3 commits into from
Dec 3, 2020
Merged

Allow watch early exit #865

merged 3 commits into from
Dec 3, 2020

Conversation

tanema
Copy link
Contributor

@tanema tanema commented Dec 3, 2020

fixes #855

Currently pressing ctrl-C while watch is running will not terminate its execution. This is because the signal channel is unbuffered so signal.Notify cannot write to the channel until it is read and it gets starved in the select statement. I added a buffer of 1 which allows it to be cancelled.

Warn Checklist

  • This changes the interface and requires a Major/Minor version change.
  • I have 🎩'd these changes by using the commands I changed by hand.
  • I have added a dependancy to the project.
  • I have considered any potential impact on node-themekit

@tanema tanema merged commit 7841f7a into master Dec 3, 2020
@tanema tanema deleted the allow_watch_early_exit branch December 3, 2020 17:34
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 this pull request may close these issues.

Cannot cancel watch when transfer/theme update is running
1 participant