Jerry Schwarz wrote:
> In Bill's example if we accept feature 2 then the optimization would be
> disallowed. If we accept feature 2' then the example doesn't contain [fill
> in the blank] so feature 2' doesn't apply and we can say (as I anticipate
> Cliff will say) that any behavior is acceptable for code containing
> unsynchronized references.
Cliff Click wrote:
> (1) Person writes junk code and gets bit. No big deal.
I am concerned about the situation, where the two Runnable's represent
distinct code written by distinct parties. If Person 1 writes the junk code
and gets bit - that's fine by me. If Person 1 writes the junk code and
Person 2 gets bit - that's not fine.
I would hope however, that in the case of two Runnables being executed by
the same thread, the CSE style of optimisation would simply not be
applicable, as that is a local optimisation right? And so the code for the
two Runnables would be sufficiently separated by time and space for that
sort of optimisation to never enter the picture.
Even if that is true, however, I don't think it helps from the perspective
of the model.
David Holmes
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:38 EDT