[concurrency-interest] Volatile array and Wait

Dawid Kurzyniec dawidk at mathcs.emory.edu
Fri Oct 21 16:15:51 EDT 2005


Pete Soper wrote:

>Dawid Kurzyniec wrote:
>  
>
>>Pete Soper wrote:
>>
>>
>>    
>>
>>>See sections 8.3.1.4 and 17.4.5, especially the discussion item in the
>>>latter section:
>>>
>>>"A write to a volatile field happens happens before every subsequent
>>>read of that field."
>>>
>>>This doesn't say "if the read or write doesn't get optimized away." This
>>>text isn't making a suggestion. 
>>>
>>>
>>>      
>>>
>>Optimizations, by definition, are never mentioned in the spec (unless as 
>>hints). An optimization can do whatever it wants as long as it does not 
>>    
>>
>
>I didn't mean to imply it would be proper to mention optimizations in a
>spec. That was a flippant remark. I'll try not to make those kinds of
>remarks in the future, realizing they don't work well with email!
>  
>
And I didn't mean to sound patronizing :) My focus was on the second 
part: the freedom of optimizations is constrained by precise 
requirements of the spec; what it says is sacred, what it does _not_ say 
is a room for optimization. I agree, e-mail distorts intentions :)

Regards,
Dawid



More information about the Concurrency-interest mailing list