[concurrency-interest] Synchronization question

Dhanji R. Prasanna dhanji at gmail.com
Wed Jun 28 19:05:40 EDT 2006

On 6/29/06, Brian Goetz <brian at quiotix.com> wrote:
> > I agree w/ the spirit of Holger's questions 100% because it deals w/
> > what is happening on the ground now, not what is theoritically
> > supposed to happen.
> To some degree, Holger's question is analogous to when your kid says
> "but I ran with the scissors every day last week and I didn't put my eye
> out!"  Just because one can engage in risky behavior "a lot of times"
> and not suffer negative consequences doesn't mean that you are not
> asking for trouble.

I agree that there isnt much merit to discussing what may happen on a
specific architecture/CPU, as we can only ever guarantee behavior according
to the language specification. Most apps are intended to run on any JVM
(even ones for CPUs not built yet) anyway, and cannot be deterministic if
there is a presumption of a specific CPU architecture (you're better off
compiling to native in that case).

I'm mainly interested in unambiguous clarification of the apparently (?)
> possible time window that may or may not exist after the synchronized set
> method has returned.

Afaics, there is no way to unambiguously clarify this without a
machine-specific answer.

The size of that window (if it exists?) constitutes a
"visibility race" and if it is ever allowed to be "forever" - as per
Brian's comment above - then many applications will produce "interesting"

Im not clear how this is a race condition, if the reader acts after the
happens-before edge, there won't be a competition for shared memory--unless
I am missing something (quite possible)? Do you just mean that there is an
(potential) undefined delay?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20060629/0aa861bc/attachment.html 

More information about the Concurrency-interest mailing list