Safely writing to the same file in parallel foreach loop

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Nov 15 03:31:18 PST 2012


On 11/15/2012 01:55 AM, Joseph Rushton Wakeling wrote:
> An oddity here: although the correct results seem to come out of the
> calculation, at the end, the program containing the parallel foreach hangs -- it
> doesn't stop running, even though all the calculations are complete.
>
> Any thoughts as to why?  I guess a thread that has not closed correctly, but I
> can't see why any one of them should not do so.

On closer examination, this appears to be only with gdc-compiled code -- if I 
compile with ldc or dmd the program exits normally.



More information about the Digitalmars-d-learn mailing list