[concurrency-interest] Can a volatile read be reordered before a lazySet?
aph at redhat.com
Sun Dec 28 06:08:41 EST 2014
On 28/12/14 00:53, Gil Tene wrote:
> The only ordering that lazySet is actually known/required to provide
> will prevent the store operation from being reordered with any
> stores that came before it. There is nothing to prevent it from
> being pushed forward past other non-dependent stores, loads, or
> volatile loads. [The thing that stops it being pushed forward past a
> non-dependent volatile store is the volatile store's relationship
> with stores that precede it].
But, as Doug said:
"There are three basic strengths of write: Relaxed (normal),
releasing, and SC volatile. I got talked into naming the second
releasing version 'lazySet' which is confusing enough, but compounded
by the almost equally odd internal unsafe name 'ordered'.
"These should be less confusing in JDK9 when we provide more uniform
More information about the Concurrency-interest