On 11/14/2012 06:49 PM, Vijay Nayar wrote:
Could you put the file access in a synchronized block?http://dlang.org/statement.html#SynchronizedStatement
Oh, good call -- seems to work.If you try and run the parallel code without it, there's a pretty nasty-looking error:
/tmp/.rdmd-1000/rdmd-pforeach.d-7A1C6D0E6B47053236731E75615AD487/pforeach: double free or corruption (out): 0x00007f58bc000910 ***
... but with the synchronized {} block around the file append, all seems to work fine.