🟡 P2 | events.rs Mutex 投毒后静默丢事件 #44
Loading…
x
Reference in New Issue
Block a user
No description provided.
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?
背景
push_reading_event 和 clear_exported_events 用 if let Ok(...) = lock() 忽略 MutexPoison。某处 panic 后所有事件静默丢失,调用方无感知。
修复方案
poison 后记录 warning 日志并清空缓冲区重建。
位置
crates/zx_document_core/src/events.rs:11-14, 33-37
修复完成 (2026-06-06)
实现
push_reading_event改用match替代if let,Mutex poison 时通过into_inner()恢复缓冲区。状态
✅ 已修复。