1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Merge pull request #1768 from rentianle2022/main

fix typo: 422行中代码段//注释的错误格式
This commit is contained in:
Guide 2022-07-08 13:36:22 +08:00 committed by GitHub
commit da619e2384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -419,7 +419,7 @@ public V get(Object key) {
private final Node<K,V>[] initTable() {
Node<K,V>[] tab; int sc;
while ((tab = table) == null || tab.length == 0) {
 如果 sizeCtl < 0 ,说明另外的线程执行CAS 成功正在进行初始化
// 如果 sizeCtl < 0 ,说明另外的线程执行CAS 成功正在进行初始化
if ((sc = sizeCtl) < 0)
// 让出 CPU 使用权
Thread.yield(); // lost initialization race; just spin