Closed brentru closed 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().
loop_start()
loop_background()
loop_stop()
i.e: loop_background(stop=True) https://www.eclipse.org/paho/clients/python/docs/#network-loop
loop_background(stop=True)
Addressed in https://github.com/adafruit/io-client-python/commit/b344704d7cc33cf72c0da6e4817311f464633c76, closing...
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 byloop_background()
. Let's also addinloop_stop()
as a kwarg intoloop_background()
.i.e:
loop_background(stop=True)
https://www.eclipse.org/paho/clients/python/docs/#network-loop