🟡 [M6] 后台线程在有界通道上阻塞 send #16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
文件:
core/io/progressive_reader.rs:302,328分类: 并发 / 通道
问题: 后台 worker 线程使用阻塞
send在有界通道(容量 10)上。如果消费者暂停,线程无限挂起,持有资源且无法到达完成/取消检查。建议修复: 进度消息使用
try_send,始终优先发送最终状态,或使用select!加取消。已修复,提交 0d88e93。
根因: spawn_indexer 和 spawn_visual_height_rebuild 的后台线程使用阻塞 tx.send() 在有界通道上,consumer 停止 drain 时线程永久挂起,取消检查不可达。
修复方案:
测试: 5 个新增测试覆盖满通道+取消场景,全量 379 测试通过。