3 ms·
“If you're doing lazy iteration you have to keep it open, and I don't understand why that's an issue.” It isn’t an issue if you process a few files that way (u
by Someone 6y ago
“If you're doing lazy iteration you have to keep it open, and I don't understand why that's an issue.”
It isn’t an issue if you process a few files that way (unless you’re running your system very close to the limit), but it is an issue if you have a long running process that lazily iterates over files often. Examples are iterating over a file system (say a kind of grep) or a web server where an often called entry point does this.
- viraptor 6y agoSure. But I was getting at something different. You can choose your open files limit on one side and the approach (lazy or not) on the other. If you choose lazy there's no way around having to leave the file open.