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

Kill poller_thread before waiting for it to die #113

Merged
merged 1 commit into from
May 14, 2013

Conversation

antifuchs
Copy link
Contributor

I noticed that recent guard versions sometimes fail to exit if there's a poller thread running: If so, it'll just hang on exit after saying "INFO - Bye bye...". When Ctrl-C'ing that, it will return you to the REPL and quitting immediately afterwards (via "quit") works.

I tracked this problem down to the listen adapter waiting for a poller thread to quit without actually telling it to terminate.

This patch kills the poller thread before joining the thread, which makes guard reliably exit. I hope you'll consider including this in a release (-:

When stopping, each adapter needs to kill its poll thread before it
can wait for it to exit - this ensures Guard can quit reliably without
hanging.
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 042f4d0 on antifuchs:kill-poller-thread-before-joining into * on guard:master*.

@thibaudgg
Copy link
Member

Awesome thanks, really nice digging.

thibaudgg added a commit that referenced this pull request May 14, 2013
Kill poller_thread before waiting for it to die
@thibaudgg thibaudgg merged commit 1710039 into guard:master May 14, 2013
@thibaudgg
Copy link
Member

Version 1.1.1 released!

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.

3 participants