adafruit / Adafruit_IO_Python

Adafruit IO Python Client Library
Other
225 stars 99 forks source link

Add threaded loop stop #66

Closed brentru closed 6 years ago

brentru commented 6 years ago

We have a way to start a background thread, but no real way to stop it cleanly (without invoking a KeyboardInterrupt during a running script)

Paho's loop_start() is abstracted by loop_background(). Let's also addinloop_stop() as a kwarg into loop_background().

i.e: loop_background(stop=True) https://www.eclipse.org/paho/clients/python/docs/#network-loop

brentru commented 6 years ago

Addressed in https://github.com/adafruit/io-client-python/commit/b344704d7cc33cf72c0da6e4817311f464633c76, closing...