RFR: 8322149: ConcurrentHashMap copy constructor should not transfer from old table on presizing [v2]

Joshua Cao duke at openjdk.org
Thu Jan 11 19:23:22 UTC 2024


On Thu, 11 Jan 2024 09:40:07 GMT, Volker Simonis <simonis at openjdk.org> wrote:

> tryPresize(int size) is doing and if its size argument is supposed to contain the additional number of elements which will be inserted into the hash map or if it is a hint for the new total size of the hash map

Argument `size` for `tryPresize()` is a hint for the **new total size** of the hash map. If the size is too small compared to the current size of the map, there will be no resizing.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17116#discussion_r1449296202


More information about the core-libs-dev mailing list