Message413489
> 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. |
|
Date |
User |
Action |
Args |
2022-02-18 15:28:38 | asvetlov | set | recipients:
+ asvetlov, gvanrossum, njs, jab, alex.gronholm, chris.jerdonek, yselivanov, tinchester, iritkatriel, ajoino |
2022-02-18 15:28:38 | asvetlov | set | messageid: <1645198118.51.0.519152040593.issue46771@roundup.psfhosted.org> |
2022-02-18 15:28:38 | asvetlov | link | issue46771 messages |
2022-02-18 15:28:38 | asvetlov | create | |
|