This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asvetlov
Recipients ajoino, alex.gronholm, asvetlov, chris.jerdonek, gvanrossum, iritkatriel, jab, njs, tinchester, yselivanov
Date 2022-02-18.15:28:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645198118.51.0.519152040593.issue46771@roundup.psfhosted.org>
In-reply-to
Content
> the third case the behavior is wrong, the `.cancel()` should win over the timeout. Otherwise using the context manager becomes too risky in real-world situations.

Please elaborate. The first code that calls `.cancel()` wins, doesn't matter what is the source. asyncio has no priorities.

> I also think your first graph has an issue if the user has a `try/except TimeoutError` between `timeout-a` and `timeout-b`, which is now more probable since we're dropping `move_on`. We can take the discussion to the forked repo; I can put together some tests if that would make it easier.

Ok, let's discuss on GitHub. I only would mention that no code could be executed between timeout-a and timeout-b, because both events are scheduled between the previous event loop iteration and the current one.
Sure, if we can start talking with code (and failed tests) -- it can raise the understanding level very much.
History
Date User Action Args
2022-02-18 15:28:38asvetlovsetrecipients: + asvetlov, gvanrossum, njs, jab, alex.gronholm, chris.jerdonek, yselivanov, tinchester, iritkatriel, ajoino
2022-02-18 15:28:38asvetlovsetmessageid: <1645198118.51.0.519152040593.issue46771@roundup.psfhosted.org>
2022-02-18 15:28:38asvetlovlinkissue46771 messages
2022-02-18 15:28:38asvetlovcreate