We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5bf7cd commit b344704Copy full SHA for b344704
Adafruit_IO/mqtt_client.py
@@ -139,11 +139,16 @@ def disconnect(self):
139
if self._connected:
140
self._client.disconnect()
141
142
- def loop_background(self):
+ def loop_background(self, stop=None):
143
"""Starts a background thread to listen for messages from Adafruit.IO
144
and call the appropriate callbacks when feed events occur. Will return
145
immediately and will not block execution. Should only be called once.
146
+
147
+ Params:
148
+ - stop: boolean, stops the execution of the background loop.
149
"""
150
+ is stop:
151
+ self._client.loop_stop()
152
self._client.loop_start()
153
154
def loop_blocking(self):
0 commit comments