Re: [Python-Dev] PEP 525

2016年8月25日 04:46:54 -0700

On 25 August 2016 at 05:00, Yury Selivanov <[email protected]> wrote:
> On 2016年08月24日 12:35 PM, Guido van Rossum wrote:
>> Hopefully there will be other discussion as well, otherwise I'll have to
>> accept the PEP once this issue is cleared up. :-)
>
> Curious to hear your thoughts on two different approaches to finalization.
> At this point, I'm inclined to change the PEP to use the second approach. I
> think it gives much more power to event loops, and basically means that any
> kind of APIs to control AG (or to finalize the loop) is possible.
The notification/callback approach where the event loop is given a
chance to intercept the first iteration of any given coroutine seems
nicer to me, since it opens up more opportunities for event loops to
experiment with new ideas. As a very simple example, they could emit a
debugging message every time a new coroutine is started.
asyncio could provide a default notification hook that just mapped
weakref finalisation to asynchronous execution of aclose().
Cheers,
Nick.
-- 
Nick Coghlan | [email protected] | Brisbane, Australia
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to