adafruit / Adafruit_CircuitPython_MiniMQTT

MQTT Client Library for CircuitPython
Other
80 stars 49 forks source link

asyncio support? #159

Open d-Rickyy-b opened 1 year ago

d-Rickyy-b commented 1 year ago

Hi there,

due to issues like #148 and #138 I was wondering if it was possible to implement asyncio support in order to simultaneously process new mqtt events and do other stuff concurrently. asyncio is suggested by adafruit as the way to deal with concurrent tasks. So I was wondering, why the library does not support asyncio (yet?).

Best regards, Rico

brentru commented 1 year ago

So I was wondering, why the library does not support asyncio (yet?).

@d-Rickyy-b This library was developed prior to the inclusion of asyncio.

crbyxwpzfl commented 4 months ago

hi perhpas this helps. I missed a lot of button presses with minimqtt and wrapped all the minimqtt stuff in a async function. you can use a class to share information between tasks. this solved it I think. anyways im not to good in this just thought I leave this here. not sure I am helpfull but let me know your concret issue and I try my best

clear and good explained examples by adafruit here and my convoluted example here