A
Andreas Leitgeb
http://java.sun.com/docs/books/jls/third_edition/html/memory.html#17.4
Finally I got time to read and (attempt to) understand the JLS
about concurrency. There's a couple of wordings that appear
strange to me - maybe because of some insufficiency of my
English-language skills.
But in section 17.4.5 right after "Trace 17.5" there's this
paragraph:
" A set of actions A is happens-before consistent if for all
" reads r in A, it is not the case that either hb(r, W(r)),
" where W(r) is the write action seen by r or that there
" exists a write win A such that w.v = r.v and hb(W(r), w)
" and hb(w, r).
If ever "hb(r, W(r)), where W(r) is the write action seen by r"
then I couldn't help but consider the particular JVM-imple-
mentation utterly broken. How can this "either"-branch not
be empty?
How could a "read" that happens-before a particular "write" *ever*
see the "write"'s value?
Maybe, someone could explain, what that *really* means?
Finally I got time to read and (attempt to) understand the JLS
about concurrency. There's a couple of wordings that appear
strange to me - maybe because of some insufficiency of my
English-language skills.
But in section 17.4.5 right after "Trace 17.5" there's this
paragraph:
" A set of actions A is happens-before consistent if for all
" reads r in A, it is not the case that either hb(r, W(r)),
" where W(r) is the write action seen by r or that there
" exists a write win A such that w.v = r.v and hb(W(r), w)
" and hb(w, r).
If ever "hb(r, W(r)), where W(r) is the write action seen by r"
then I couldn't help but consider the particular JVM-imple-
mentation utterly broken. How can this "either"-branch not
be empty?
How could a "read" that happens-before a particular "write" *ever*
see the "write"'s value?
Maybe, someone could explain, what that *really* means?