John Wilson wrote:
[...]
Categories are thread specific so you don't need volatile access to see
if a Category has been applied.
You do need volatile to see if a global change has been made to the
behaviour of a class and I can't see any way round that.
I partially agree. But what do I do if a non initialized object becomes
visible because no volatile was used for that object? Isn't that part of
the double checked locking idiom problem?
But thinking about your suggestion it is most probably overkill to use
an AtomicInteger for the category usage counter. A simple counter should
do, since that is only a integer.
But doing that change seems not to have any effect yet
bye Jochen
--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
--
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en.