Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
rename file before reading to avoid windows file lock issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Jan 2, 2015
1 parent f6b7348 commit 87c9c12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benchmark/runbench.d
Expand Up @@ -79,10 +79,11 @@ void runTests(Config cfg)

if (exists("gcx.log"))
{
auto lines = File("gcx.log", "r").byLine()
auto tgt = bin.setExtension("gcx.log");
rename("gcx.log", tgt);
auto lines = File(tgt, "r").byLine()
.find!(ln => ln.canFind("maxPoolMemory"));
if (!lines.empty) gcprof = lines.front.find("maxPoolMemory").idup;
rename("gcx.log", bin.setExtension("gcx.log"));
}
else
{
Expand Down

0 comments on commit 87c9c12

Please sign in to comment.