tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: bug in TC6 ContainerBase class?
Date Fri, 21 Jan 2011 16:36:38 GMT
> From: sebb [mailto:sebbaz@gmail.com] 
> Subject: Re: bug in TC6 ContainerBase class?

> Do you mean:
> * the compiler must assume that there is no synch, or
> * the compiler must assume that there is synch.

The latter; in the absence of information to the contrary, the compiler must assume the worst
case - that synchronization can occur as a side effect of the method call.

> > Nope, it's required to be reloaded due to the constraints 
> > mentioned above.

> If any reloading is required, it surely only applies to the 
> current thread.

Correct.  The one under discussion is the one with the "while (!threadDone)" loop.

> So as far as I can tell, calling non-synch. methods only affects
> compiler optimisation - it does not affect visibility of changes in
> other threads.

True - but the javac compiler cannot be certain that there's no synchronization going on inside
the called methods or any nested method calls therein.  A JIT could, in theory, have access
to that information (and all other side effects), and optimize out non-volatile memory references,
but the overhead of doing so is impractical.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message