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

Make Iterator a daemon for proper exit #44

Merged
merged 1 commit into from
Oct 29, 2016
Merged

Conversation

jochasinga
Copy link
Contributor

As per this issue I have added self.daemon = True to Iterator's constructor thus upon the termination of the main thread the daemon thread will die.

>>> it = util.Iterator(board)
>>> it.start()
>>> it.is_alive()    # -> True
>>> quit()           # Used to hang, now terminates

If a test case is required for this, I'll write that and issue in another request.

The entire Python program exits when no alive non-daemon threads are left.
https://docs.python.org/3/library/threading.html#threading.Thread.daemon

Conflicts:
	pyfirmata/util.py
@edne
Copy link

edne commented Oct 28, 2016

Please merge this, or implement something equivalent

@jochasinga
Copy link
Contributor Author

@edne according to the last commit in 2015, it seems like @tino isn't active on this project anymore. You can use my fork if you need this fix now.

@tino tino merged commit 31e2274 into tino:master Oct 29, 2016
@tino
Copy link
Owner

tino commented Oct 29, 2016

I have indeed been quite inactive. Just found some time to merge some PR's though!

@tino tino mentioned this pull request Oct 29, 2016
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