-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed as not planned
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-featureA feature request or enhancementA feature request or enhancement
Description
The issue boils down to this line:
Line 215 in 6bc65c3
if self._fut_waiter.cancel(msg=msg): |
First off the bat, I realize this may be impossible to change due to backwards comp. Still, let's discuss.
Task A awaits task B. Someone cancels task A. Task B gets cancelled instead.
This probably makes sense in some contexts, for example if task A is the logical owner/parent of task B.
But in my case, task B was created in a long-lived taskgroup. Its lifecycle is independent of task A. They are now coupled by this invisible link created by the await.
I wonder if we could make this cancellation forwarding be skipped in some cases, like if the awaitee was created through a task group (since that mitigates the danger of leaking tasks).
Metadata
Metadata
Assignees
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
Done