This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author achimnol
Recipients achimnol, asvetlov, terry.reedy, yselivanov, zkonge
Date 2020-07-19.09:05:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595149528.23.0.455221824957.issue41229@roundup.psfhosted.org>
In-reply-to
Content
From the given example, if I add "await q.aclose()" after "await q.asend(123456)" it does not leak the memory.

This is a good example showing that we should always wrap async generators with explicit "aclosing" context manager (which does not exist yet in the stdlib).
I'm already doing so by writing a custom library:
https://github.com/achimnol/aiotools/blob/ef7bf0ce/src/aiotools/context.py#L152

We may need to update the documentation to recommend explicit aclosing of async generators.
History
Date User Action Args
2020-07-19 09:05:28achimnolsetrecipients: + achimnol, terry.reedy, asvetlov, yselivanov, zkonge
2020-07-19 09:05:28achimnolsetmessageid: <1595149528.23.0.455221824957.issue41229@roundup.psfhosted.org>
2020-07-19 09:05:28achimnollinkissue41229 messages
2020-07-19 09:05:28achimnolcreate