🔴 [H7] 文件监控回调中使用阻塞 send #7
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/watcher/file_watcher.rs:65-98分类: 并发 / 通道
问题: notify 回调在 notify 内部线程中调用阻塞
tx.send(),通道容量 100。如果消费者停止消费(UI 冻结),回调会无限阻塞,导致 Drop/shutdown 延迟,后续事件全部丢失。建议修复: 改用
try_send,或使用非阻塞/无界通道加显式背压策略。