Safely writing to the same file in parallel foreach loop
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Wed Nov 14 16:55:05 PST 2012
On 11/15/2012 12:44 AM, Joseph Rushton Wakeling wrote:
> In the application I have in mind, there is a LOT of work that would be done
> within the parallel foreach loop -- we're talking at least 20 minutes' solid
> processing before the file write takes place, so this seems an appropriate
> approach given how simple it is.
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.
More information about the Digitalmars-d-learn
mailing list