[..]
> Currently, I just don't see any other way to use some async generator (that 
> needs some time to be closed) without getting warning.

It will be a very rare case — you need a generator that produces an infinite 
series of values with a try..finally block.

For those kinds of generators you will have a standard asyncio warning that a 
task was GCed in pending state.

We can maintain a weak set of ‘aclose’ tasks in the event loop, and make it a 
public and documented property.  That way you’ll be able to call gather() with 
a timeout on that list before closing the loop.  

The PEP doesn’t specify how exactly asyncio should be modified.  This is 
something we can discuss when the PEP patch is reviewed.

Yury
_______________________________________________
Async-sig mailing list
Async-sig@python.org
https://mail.python.org/mailman/listinfo/async-sig
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to