Closed stephanelsmith closed 1 year ago
This seems simplest:
def deinit(self):
if self._mtask is not None:
self.stop()
self._mtask.cancel()
self._mtask = None
Agreed, I'll put a PR together tomorrow. Much appreciated for taking a look.
Fix now implemented. Thanks for pointing this out.
Ya beat me to it! Just getting a chance tonight. Much appreciated. Thank you.
In Delay_ms, if canceled and cancled again, you get and error that you cannont cancel() "None".
Recommending:
Similar to the issue raised in the micropython issues area regarding gather, getting into the weeds of reliability. Would prefer to make deinit "safe" as I would like to not have to wrap all calls like this in try/except blocks.
Appreciate your consideration! Happy to put together a PR.