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 03:59:01 GMT
> From: maxxedit@gmail.com [mailto:maxxedit@gmail.com] 
> Subject: bug in TC6 ContainerBase class?

> In TC6 catalina core, ContainerBase class defines this field to stop
> the background processor thread:
>
>      private boolean threadDone = false;
>
> Shouldn't it be a volatile?

In theory, the field should be marked volatile.  In practice, it won't make any difference,
since the method calls will force a reload of the value upon return and the compiler must
assume that the value could have changed.  The worst that could happen is that the thread
never sees threadDone as true, and thus would never terminate - but, to my knowledge, there's
never been any instances of that reported.

 - 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