# 错误：CPU 占用 100%：带 default 的 select 在紧密循环中空转

- **ID:** `go/select-default-busy-loop`
- **领域:** go
- **类别:** resource_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

带有 default 分支的 'for { select { case ...: default: } }' 循环永不阻塞，当没有 case 就绪时它会占满一个 CPU 核心空转。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.18 | active | — | — |
| 1.22 | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   Remove the default branch so select blocks until a case is ready
   ```
2. **** (85% 成功率)
   ```
   If polling is required, add a time.After backoff: 'case <-time.After(100*time.Millisecond):'
   ```

## 无效尝试

- **** — Yields but still spins at high CPU; just slightly less hot (80% 失败率)
- **** — Starves other goroutines and hides rather than fixes the spin (85% 失败率)
