A bug with automatic variables and finally

Robert S. Thau rst at ai.mit.edu
Thu May 1 13:27:15 PDT 1997


  You mean asynchronous like one thread can generate an exception in
  another?  Given this is the case how the hell do they write an 
  to be atomic (I think they say they are somewhere)? 

FWIW, they actually go out of their way to say the opposite in some
cases at least --- writes to Java double and long types are explicitly
not atomic.  Also, out-of-order writes are explicitly allowed in some
circumstances (fields not marked 'volatile').

The whole topic of what transformations are allowed is discussed in
the Java language spec., ch. 17, and in the VM spec, ch. 8;
unfortunately, though, neither one of them says much about exceptions,
asynchronous or otherwise.  (These seem to be pretty much the same
text; it's a bit weird having the discussion in the VM spec phrased
almost exclusively in terms of Java source).

rst



More information about the kaffe mailing list