On Sun, 18 May 2003, Michael Schierl wrote:

> IMO volatile without synchronized is only a good idea for booleans
> (volatile booleans will be reread as often as possible, non-volatile
> booleans may be cached by each thread till the next enter/exit of a
> synchronized block) or for longs/doubles (for preventing mangled
> values), but not for ints.

Probably more than half of you have seen this, but for those who haven't, 
I thought this was pertinent:

Java theory and practice: Urban performance legends
http://www-106.ibm.com/developerworks/java/library/j-jtp04223.html?ca=dgr-lnxw01JavaUrbanLegends

(Which is not to say mihi's above stated tip counts as "urban" or, for 
that matter, "performance".)

-todd
_______________________________________________
devl mailing list
devl at freenetproject.org
http://hawk.freenetproject.org:8080/cgi-bin/mailman/listinfo/devl

Reply via email to