# 错误：检测到goroutine泄漏（通道发送阻塞）

- **ID:** `go/goroutine-leak-channel-block`
- **领域:** go
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

goroutine在向通道发送数据时阻塞，因为没有其他goroutine从该通道读取。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   go func() { ch <- data }(); result := <-ch
   ```
2. **** (90% 成功率)
   ```
   select { case ch <- data: default: /* handle timeout */ }
   ```

## 无效尝试

- **** — Only postpones the problem; buffer fills up eventually. (60% 失败率)
- **** — Sleep does not fix the root cause; may cause indefinite blocking. (90% 失败率)
