aboutsummaryrefslogtreecommitdiff
path: root/docs/api.rst
diff options
context:
space:
mode:
authorSteve C <[email protected]>2021-04-16 22:35:18 -0400
committerGitHub <[email protected]>2021-04-16 22:35:18 -0400
commitef9bb79e91a6b7b03f9faf61f1f7cc59eefe15f1 (patch)
treed4c81ac874888d4f9faed486a77b44ccc9c8f450 /docs/api.rst
parentRevert Attachment.save code to prior implementation (diff)
downloaddiscord.py-ef9bb79e91a6b7b03f9faf61f1f7cc59eefe15f1.tar.xz
discord.py-ef9bb79e91a6b7b03f9faf61f1f7cc59eefe15f1.zip
[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`.
Diffstat (limited to 'docs/api.rst')
0 files changed, 0 insertions, 0 deletions