Safely writing to the same file in parallel foreach loop
Vijay Nayar
madric at gmail.com
Thu Nov 15 07:09:01 PST 2012
I'm not a robot and didn't mean to spam, the page got stuck in
this odd refresh loop and I wasn't sure what was going on.
On Wednesday, 14 November 2012 at 17:45:35 UTC, Vijay Nayar wrote:
> On Wednesday, 14 November 2012 at 16:43:37 UTC, Joseph Rushton
> Wakeling wrote:
>> On 11/14/2012 05:16 PM, H. S. Teoh wrote:
>> I take it there's no more "native-to-D" way of implementing a
>> file lock? :-(
>
> Could you put the file access in a synchronized block?
>
> http://dlang.org/statement.html#SynchronizedStatement
>
> - Vijay
More information about the Digitalmars-d-learn
mailing list