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 nascheme
Recipients martin.panter, nascheme, neologix, nikratio, nitishch, pitrou, serhiy.storchaka, tim.peters, vstinner, xgdomingo
Date 2017-12-19.20:42:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513716172.68.0.213398074469.issue17852@psf.upfronthosting.co.za>
In-reply-to
Content
Yeah, I think you are correct.  Currently files not part of reference cycles get properly flushed and closed by the reference counter.  Implementing my "buffer_register_flush" patch would cause files to be closed only by the cyclic garbage collector (if not explicitly closed).  That would mean a script that opens a large number of files could run out of file descriptors.  Basically, we lose one of the main advantages of reference counting.

Probably the GC should keep track of how many files are open and call collect() when a threshold is reached.  Still, forcing every file to be collected only by the cyclic GC seems too ugly of a solution to this issue.
History
Date User Action Args
2017-12-19 20:42:52naschemesetrecipients: + nascheme, tim.peters, pitrou, vstinner, nikratio, neologix, martin.panter, serhiy.storchaka, xgdomingo, nitishch
2017-12-19 20:42:52naschemesetmessageid: <1513716172.68.0.213398074469.issue17852@psf.upfronthosting.co.za>
2017-12-19 20:42:52naschemelinkissue17852 messages
2017-12-19 20:42:52naschemecreate