Skip to content

Commit 96497ef

Browse files
authored
Merge pull request Snailclimb#1473 from nicollcheng/patch-1
更新链表树化条件
2 parents 6d9b99e + 3352123 commit 96497ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/java/collection/concurrent-hash-map-source-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ final V putVal(K key, V value, boolean onlyIfAbsent) {
541541

542542
5. 如果都不满足,则利用 synchronized 锁写入数据。
543543

544-
6. 如果数量大于 `TREEIFY_THRESHOLD` 则要转换为红黑树
544+
6. 如果数量大于 `TREEIFY_THRESHOLD` 则要执行树化方法,在treeifyBin中会首先判断当前数组长度≥64时才会将链表转换为红黑树
545545

546546
### 4. get
547547

0 commit comments

Comments
 (0)