Steve C
a9dba2753f
[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-05-01 10:28:00 -04:00
..
2020-12-12 20:23:57 -05:00
2021-05-01 10:28:00 -04:00
2021-04-05 21:21:41 -04:00
2021-02-28 23:33:18 -05:00
2021-05-01 10:26:11 -04:00
2021-02-18 00:43:19 -05:00
2021-01-15 05:28:11 -05:00
2021-01-15 05:28:11 -05:00
2021-03-01 08:55:53 -05:00
2021-01-15 05:28:11 -05:00
2021-03-13 00:42:25 -05:00
2021-04-03 23:08:03 -04:00
2021-04-15 09:00:09 -04:00
2021-03-28 06:28:35 -04:00
2021-01-15 05:28:11 -05:00
2021-05-01 10:26:11 -04:00
2021-01-15 05:28:11 -05:00
2021-04-03 22:43:41 -04:00
2021-02-24 21:26:51 -05:00
2021-01-17 00:18:10 -05:00
2021-03-13 01:47:06 -05:00
2021-02-24 21:26:51 -05:00
2021-05-01 10:24:40 -04:00
2021-04-03 22:43:41 -04:00
2021-01-15 05:28:11 -05:00
2021-02-28 23:35:05 -05:00
2021-02-24 21:26:51 -05:00
2021-05-01 10:24:07 -04:00
2021-01-15 05:28:11 -05:00
2021-05-01 10:26:11 -04:00
2021-01-15 05:28:11 -05:00
2021-01-15 05:28:11 -05:00
2021-01-15 05:28:11 -05:00
2021-02-24 21:26:51 -05:00
2021-01-24 05:17:47 -05:00
2021-04-03 22:43:41 -04:00
2021-01-15 05:28:11 -05:00
2021-02-28 23:55:37 -05:00
2021-01-15 05:28:11 -05:00
2021-02-23 03:36:37 -05:00
2021-02-18 07:26:20 -05:00
2021-02-24 21:26:51 -05:00
2021-05-01 10:24:40 -04:00
2021-05-01 10:27:12 -04:00
2021-01-15 05:28:11 -05:00
2021-03-13 00:42:25 -05:00
2021-03-28 18:39:15 -04:00
2021-03-29 23:52:14 -04:00
2021-01-15 05:28:11 -05:00
2021-04-29 19:21:33 -04:00
2021-02-24 21:26:51 -05:00