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
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