jalmeroth / homie-python

A Python-implementation of the homie v2 convention.
https://github.com/marvinroger/homie
54 stars 15 forks source link

Cannot be stopped with CTL-C #5

Closed jpmens closed 8 years ago

jpmens commented 8 years ago

On Python 2.7, homie-python cannot be stopped with CTRL-C.

(Oh, I notice you've changed the name from homie-python3 to homie-python; well done. :-)

jalmeroth commented 8 years ago

I found the root-cause of this to be the update timers not being canceled. To quick-fix this, I introduced Homie.quit(). But this is probably not the most pythonic way so I will leave this issue open and dig into this later on.

jpmens commented 8 years ago

Homie.quit() works. Would an atexit handler do the trick?

jalmeroth commented 8 years ago

Threads had to be daemonic before atexit kicks in. Thanks for the heads-up!