Safely writing to the same file in parallel foreach loop
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Thu Nov 15 05:12:24 PST 2012
On 11/15/2012 12:31 PM, Joseph Rushton Wakeling wrote:
> 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.
OK, this is a known bug with GDC:
http://www.gdcproject.org/bugzilla/show_bug.cgi?id=16
More information about the Digitalmars-d-learn
mailing list