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

Fix Iterator thread to exit properly #41

Closed
wants to merge 8 commits into from

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

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

@tino
Copy link
Owner

tino commented Aug 2, 2015

Hi, please make a pull request for a single issue. The spark-core layout has nothing to do with the iterator fix (which I would like to merge). Could you open a new, clean, pull-request?

(I am not in favour of adding more board layouts to boards.py, especially non-arduino boards. It is easy enough to add them in your own code, or use the board detection feature).

@jochasinga
Copy link
Contributor Author

Ok will do.

Panisuan Chasinga
Interaction Designer
Edlab, Teachers College
Columbia University
525 West 120th Street
New York, NY 10027

m: +1(347)609-2075

[image: My LinkedIn] http://www.linkedin.com/in/jochasinga/ [image: My
Github] http://github.com/jochasinga [image: My Twitter ]
http://twitter.com/jochasinga

On Sun, Aug 2, 2015 at 9:45 AM, Tino de Bruijn [email protected]
wrote:

Hi, please make a pull request for a single issue. The spark-core layout
has nothing to do with the iterator fix (which I would like to merge).
Could you open a new, clean, pull-request?

(I am not in favour of adding more board layouts to boards.py, especially
non-arduino boards. It is easy enough to add them in your own code, or use
the board detection feature).


Reply to this email directly or view it on GitHub
#41 (comment).

@jochasinga jochasinga closed this Aug 4, 2015
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.

2 participants