bin: handle thousands of output files

Fixes #534.

* bin/common_file.hh, bin/common_file.cc: Make it possible
to reopen a closed file.
* bin/common_output.cc, bin/common_aoutput.cc: Add a heuristic
to decide when to close files.
* tests/core/serial.test: Add a test case.
* NEWS: Mention the issue.
This commit is contained in:
Alexandre Duret-Lutz 2023-07-24 16:56:24 +02:00
parent 17a5b41d8c
commit 40e30df7e3
6 changed files with 76 additions and 1 deletions

View file

@ -37,6 +37,8 @@ public:
void close(const std::string& name);
void reopen_for_append(const std::string& name);
bool append() const
{
return append_;