> From: Chris R [mailto:chris.tech...@gmail.com] 
> Subject: Race condition in DefaultServlet

> If multiple threads call doPut(...), there is a possibility that they can
> clobber each other and the value of accessCount may not really give the 
> exact number of accesses of the cache.

Which is noted in the comments.

> Can someone confirm whether this is a real problem?

Not in the real world.  If the count is off a bit, there's no measurable harm.  
The cost of synchronization outweighs the infinitesimal benefit of having a 
100% accurate number here.

 - 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