Message308681
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. |
|
Date |
User |
Action |
Args |
2017-12-19 20:42:52 | nascheme | set | recipients:
+ nascheme, tim.peters, pitrou, vstinner, nikratio, neologix, martin.panter, serhiy.storchaka, xgdomingo, nitishch |
2017-12-19 20:42:52 | nascheme | set | messageid: <1513716172.68.0.213398074469.issue17852@psf.upfronthosting.co.za> |
2017-12-19 20:42:52 | nascheme | link | issue17852 messages |
2017-12-19 20:42:52 | nascheme | create | |
|