On Monday 13 August 2007 12:34:06 Will Coleda via RT wrote:

> Doing a diff -r on the two builds, and removing binary file diffs, "only
> in" (result of the build failing), and diffs where the config time was
> the only change, I'm left with changes *only* in .str files.
>
> Which makes me wonder, what happens when you run 2 copies of
> tools/build/c2str.pl at the same time? Could this adversely impact the
> creation of 'all_cstring.str'?

From c2str.pl:

        my $outfile          = 'all_cstring.str';

        ....

        open my $ALL, '>>', $outfile or die "Can't write '$outfile': $!";

That looks very unparallelizable to me.  If multiple processes try to append 
at the same time, *whack*.

One solution might be to write to separate output files and merge them all 
together in a single step (the map-reduce approach).  Another solution is to 
add mandatory locking in this tool (the pthreads approach).

Merging seems better to me.

-- c

Reply via email to