Rémi Forax schrieb:
[...]
We can a method set(Class<?>) but it will require the VM to go to a
safepoint.
Knowing that remove() will require the same mechanism,
I think it depends how badly you need it :)
well, it would be incomplete for me without that. I don't absolutely
need a set, but then, how does the user get it? And how to ensure that
it is initialized. The result would be that I would have to do all the
synchronization I have to do now there too and then it gives no
advantage...
actually that is a general problem in Java. I would not need a set with
some bad semantics if there were an easy way for me to ensure that my
newly created object is fully initialized, without having it rely on
final fields and immutability. If that is solved, then it will help not
only me in this case here, it would most probably help Doug Lea too. Or
is there a new way for this that will go in jdk7? Fences was not ready,
was it?
ok, back to the actual matter. A safepoint is probably quite heavy for
this, but if it is the only way, then put a big warning around it and
let's have it done.
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.