On 25 August 2016 at 05:00, Yury Selivanov <yselivanov...@gmail.com> 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   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
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