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.
ESP32 port + uasyncio + mqtt_as issue
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: ESP32 port + uasyncio + mqtt_as issue
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.