ESP32 port + uasyncio + mqtt_as issue

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: ESP32 port + uasyncio + mqtt_as issue

Post by pythoncoder » Mon Jun 29, 2020 6:00 am

My approach is to use the Message class.

If you use no payload and its wait method, the API is compatible with Event. When Event is fixed you only need to change the import statement. Event is more efficient for the reason you identified, but unless your code uses large numbers of these objects, the difference (in RAM use and CPU overhead) is likely to be small.

Incidentally, when Event is fixed I will implement the commented-out code in Message, so it will acquire the efficiency of Event.
Peter Hinch
Index to my micropython libraries.

Post Reply