Steve C
ef9bb79e91
[tasks] Move the Loop's sleep to be before exit conditions
...
This change makes it more so that `Loop.stop()` gracefully makes the
current iteration the final one, by waiting AND THEN returning.
The current implementation is closer to `cancel`, while also not.
I encountered this because I was trying to run a
`@tasks.loop(count=1)`, and inside it I print some text and change the
interval, and in an `after_loop`, I restart the loop.
Without this change, it immediately floods my console, due to
not waiting before executing `after_loop`.
2021-04-16 22:35:18 -04:00
..
2020-12-12 20:23:57 -05:00
2021-04-16 22:35:18 -04:00
2021-04-14 00:48:51 -04:00
2021-04-16 11:27:23 -04:00
2021-04-07 02:30:32 -04:00
2021-04-07 21:38:01 -04:00
2021-04-15 22:41:41 -04:00
2021-04-08 06:02:47 -04:00
2021-04-16 11:27:23 -04:00
2021-04-16 11:27:23 -04:00
2021-04-11 00:39:13 -04:00
2021-04-07 02:30:32 -04:00
2021-04-16 11:27:23 -04:00
2021-04-14 20:58:49 -04:00
2021-04-07 02:30:32 -04:00
2021-04-07 02:30:32 -04:00
2021-04-15 22:41:41 -04:00
2021-04-16 11:27:23 -04:00
2021-04-11 00:39:13 -04:00
2021-04-07 02:30:32 -04:00
2021-04-07 02:30:32 -04:00
2021-04-16 11:27:23 -04:00
2021-04-14 00:47:46 -04:00
2021-04-16 11:27:23 -04:00
2021-04-16 11:27:15 -04:00
2021-04-10 02:53:24 -04:00
2021-04-08 02:12:55 -04:00
2021-04-16 11:27:23 -04:00
2021-04-10 02:53:24 -04:00
2021-04-16 11:27:23 -04:00
2021-04-08 06:02:47 -04:00
2021-04-16 11:38:56 -04:00
2021-04-07 02:30:32 -04:00
2021-04-07 02:30:32 -04:00
2021-04-07 02:30:32 -04:00
2021-04-07 02:30:32 -04:00
2021-04-16 11:27:23 -04:00
2021-04-04 07:03:53 -04:00
2021-04-08 06:02:47 -04:00
2021-04-07 02:30:32 -04:00
2021-04-08 06:02:47 -04:00
2021-04-11 00:39:13 -04:00
2021-04-12 05:28:18 -04:00
2021-04-14 22:10:47 -04:00
2021-04-16 11:27:23 -04:00
2021-04-16 11:27:23 -04:00
2021-04-10 03:23:47 -04:00
2021-04-16 11:27:23 -04:00
2021-04-11 20:18:56 -04:00
2021-04-07 02:30:32 -04:00
2021-04-08 06:02:47 -04:00