[concurrency-interest] JSR 292 Goodness: Almost static final field

Rémi Forax forax at univ-mlv.fr
Sat Dec 17 13:33:48 EST 2011

I've written a blog entry about how to write a static volatile final 
variable, i.e. a variable which is considered as constant
by the compiler (the JIT) and if the variable changes, the JITed code is 
deoptimized and
jump back in interpreter mode to eventually optimize it again later.


The code is a little bit more convoluted than it should because there is 
no invokedynamic
in Java but you can emulate it.


More information about the Concurrency-interest mailing list