Skip to content

Commit b87590f

Browse files
[3.14] gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248) (#148299)
gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248) (cherry picked from commit 2acb8d9) Co-authored-by: Manoj K M <136242596+manoj-k-m@users.noreply.github.com>
1 parent 1f17774 commit b87590f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/asyncio-future.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ Future Object
196196
Otherwise, change the Future's state to *cancelled*,
197197
schedule the callbacks, and return ``True``.
198198

199+
The optional string argument *msg* is passed as the argument to the
200+
:exc:`CancelledError` exception raised when a cancelled Future
201+
is awaited.
202+
199203
.. versionchanged:: 3.9
200204
Added the *msg* parameter.
201205

0 commit comments

Comments
 (0)