Le 29/08/2017 à 22:20, Yury Selivanov a écrit : > > 2) > > gvar = new_context_var() > var = new_context_var() > > async def bar(): > # EC = [current_thread_LC_copy, Task_foo_LC_copy, Task_wait_for_LC] Ah, thanks!... That explains things, though I don't expect most users to spontaneously infer this and its consequences from the fact that they used "wait_for()". This seems actually even more problematic, because if bar() can mutate Task_wait_for_LC, it may unwillingly affect wait_for() (assuming the wait_for() implementation may some day use EC for whatever purpose, e.g. logging). It seems framework code like wait_for() should have a way to override the default behaviour and remove their own LC's from "child" coroutines' lookup chaines. Perhaps the PEP already allows for his? Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4