Ugo Cei wrote:
I don't think it is necessary, and could hurt performance, but before I try to dig up some other reference, I'd like to know if we're talking about the same scenario.

OK, turns out my memory is getting worse each day. I was wrong, incrementing an "int" is most certainly *NOT* an atomic operation.


References:

J. Bloch, "Effective Java", page 190.
B. Eckel, "Thinking in Java, 2nd Ed.", page 734.

I am glad that I have a large selection of technical books sitting on my desk to complement my failing memory ;-)

        Ugo



Reply via email to