A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-August/149064.html below:

[Python-Dev] PEP 550 v4: coroutine policy

[Python-Dev] PEP 550 v4: coroutine policy [Python-Dev] PEP 550 v4: coroutine policyAntoine Pitrou antoine at python.org
Tue Aug 29 16:33:00 EDT 2017
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.
More information about the Python-Dev mailing list

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