#11 Typo or wrong time interval in NonBlockingHashMap resize

open
nobody
None
5
2010-05-03
2010-05-03
Paolo
No

From NonBlockingHashMap.java 1.39, resize operation:
817 if( newsz <= oldlen && // New table would shrink or hold steady?
818 tm <= topmap._last_resize_milli+10000 && // Recent resize (less than 1 sec ago)
819 (q=_slots.estimate_get()) >= (sz<<1) ) // 1/2 of keys are dead?

The "10000" is off a bit wrt. the comment, It was introduced in revision 1.16, it is impossible to verify if it's a typo or was intended from the commit comment:
http://high-scale-lib.cvs.sourceforge.net/viewvc/high-scale-lib/high-scale-lib/org/cliffc/high_scale_lib/NonBlockingHashMap.java?hideattic=1&view=diff&r1=1.15&r2=1.16

(File URL: http://high-scale-lib.cvs.sourceforge.net/viewvc/high-scale-lib/high-scale-lib/org/cliffc/high_scale_lib/NonBlockingHashMap.java?hideattic=1&revision=1.39&view=markup\)

Discussion


Log in to post a comment.