Fix possible infinite loop
authorJeff Preshing <filter-github@preshing.com>
Thu, 11 Feb 2016 19:27:32 +0000 (14:27 -0500)
committerJeff Preshing <filter-github@preshing.com>
Thu, 11 Feb 2016 19:27:32 +0000 (14:27 -0500)
commite0633b87f411d099eab8f801122b9ef58a003913
treebed0d12c4dd4eb0eca3bf88d729f0f022289cdae
parentc7fafdd7d1e574307901bb196685acf787ca23e8
Fix possible infinite loop

If the keys are badly distributed, beginTableMigration's estimatedInUse
may be too low. In extreme cases, exchangeValue could loop infinitely
migrating to the same size. Encountered once while testing
ConcurrentMap_Linear after previous commit.

Fix is to force a doubling on second loop iteration.
junction/ConcurrentMap_Grampa.h
junction/ConcurrentMap_LeapFrog.h
junction/ConcurrentMap_Linear.h
junction/details/Grampa.cpp
junction/details/Grampa.h
junction/details/LeapFrog.cpp
junction/details/LeapFrog.h
junction/details/Linear.cpp
junction/details/Linear.h