Nick Coghlan <ncogh...@gmail.com> added the comment:

Nice!

You may still need to use the lock even for the simple unbounded case though - 
incrementing hits and misses isn't atomic, so the statistics may be miscounted 
if you get a hit or miss in different threads at the same time.

Alternatively, we could just document the hit/miss statistics as approximate 
figures for tuning purposes rather than guaranteeing 100% accuracy in all 
situations.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10593>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to