Jerry Schwarz wrote:
> But we could require that the thread pool or Executor do something before
> starting each task. Thus it is not necessary that feature 2 be
> unconditional. An alternative feature 2': if task r3 loads two different
> references to x, the first incorrectly synchronized and the second
> correctly synchronized and does [fill in the blank] between the first and
> the second, then ...
I don't understand what point you are trying to make here. If the thread
pool or executor does "something" before starting each task then that is
part of the application logic and doesn't, as fas as I can see, impact on
the original question that Bill asked. Given the scenario Bill outlined,
with a thread having one invalid reference and one valid one, then I agree
that the all accesses through the valid reference should be valid. I also
expect that all accesses through the invalid one will become valid due to
the synchronization involved with obtaining the valid one - but that's not
something I would expect to be guaranteed by the model, nor would I rely
upon it.
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