[Python-Dev] PEP 525 (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Thu Aug 25 07:40:44 EDT 2016
- Previous message (by thread): [Python-Dev] PEP 525
- Next message (by thread): [Python-Dev] PEP 525
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 25 August 2016 at 05:00, Yury Selivanov <yselivanov.ml at 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 | ncoghlan at gmail.com | Brisbane, Australia
- Previous message (by thread): [Python-Dev] PEP 525
- Next message (by thread): [Python-Dev] PEP 525
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]