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: Race condition in DefaultServlet
Date Wed, 27 Jun 2012 16:49:31 GMT
> From: Chris R [mailto:chris.tech.sf@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message