> From: maxxe...@gmail.com [mailto:maxxe...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to