Commit f4bb1e8
committed
gh-141186: Document asyncio Task cancellation propagation behavior
Clarifies that cancelling a Task awaiting another Task or Future will
also cancel the awaited object. This behavior was undocumented despite
being fundamental to asyncio's cancellation architecture.
Changes:
- Updated general Task description to mention Task cancellation propagation
- Added explicit explanation in Task.cancel() method documentation
- Clarified that Tasks inherit Future's cancellation behavior
Addresses issue #141186 where users were unaware this cancellation
propagation was intentional architectural behavior, not a side effect.
The fix uses the exact wording suggested by the issue reporter and
documents the _fut_waiter implementation behavior that enables the
propagation down entire await chains.1 parent d13ee0a commit f4bb1e8
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1222 | 1222 | | |
1223 | 1223 | | |
1224 | 1224 | | |
1225 | | - | |
| 1225 | + | |
1226 | 1226 | | |
1227 | 1227 | | |
1228 | 1228 | | |
| |||
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
1234 | | - | |
| 1234 | + | |
| 1235 | + | |
1235 | 1236 | | |
1236 | 1237 | | |
1237 | 1238 | | |
| |||
1411 | 1412 | | |
1412 | 1413 | | |
1413 | 1414 | | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
1414 | 1419 | | |
1415 | 1420 | | |
1416 | 1421 | | |
| |||
0 commit comments