> >> From: email@example.com
> >> [mailto:firstname.lastname@example.org]On Behalf Of Bill Pugh
> >> This program is correctly synchronized and therefore must execute
> >> according to sequentially consistent semantics.
> > David Holmes wrote:
> >Okay I'll bite. How can the program be correctly synchronized when it
> >contains no synchronization code?
> "Correctly synchronized" == "contains no data races"
> A single threaded program is always correctly synchronized.
> Two threads that run in parallel but touch no data in common are
> correctly synchronized, no matter what synchronization they contain.
Sure. But here's the example that was being discussed:
>>For example, consider:
>>Initially, x = y = 0
>> if x != 0
>> y = 1
>> if y != 0
>> x = 1
I see two threads, each accessing data modified by the other. That's a data
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:35 EDT