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 05d1e6e commit 059b255Copy full SHA for 059b255
aswitch.py
@@ -52,17 +52,7 @@ async def _run(self):
52
if self.tstop is None: # Not running
53
await asyncio.sleep_ms(0)
54
else:
55
- twait = time.ticks_diff(self.tstop, time.ticks_ms())
56
- while twait > 0:
57
- # Must loop here: might be retriggered
58
- await asyncio.sleep_ms(twait)
59
- # stop() might be called during wait
60
- if self.tstop is None:
61
- break
62
63
- if self.tstop is not None and self.func is not None:
64
- launch(self.func, self.args) # Execute callback
65
- self.tstop = None # Not running
+ await self.killer()
66
67
def stop(self):
68
self.tstop = None
0 commit comments