fix(macos): stop_qa_hotkey_listener 包 run_on_main_thread (closes #169)#174
Merged
Conversation
QaHotkeyMonitor::drop 在 macOS 底层调 Carbon RemoveEventHotKey,要求主线程。 RunEvent::Exit 回调不保证在 AppKit 主线程跑——drop 漏到 tokio worker 上 触发 macOS dispatch_assert_queue_fail SIGTRAP,退出时偶发崩溃。 修: - coordinator.rs::stop_qa_hotkey_listener 把 .take() 包到 run_on_main_thread - AppHandle 已 None 时(极端 shutdown 序)直接 drop 兜底(最坏崩也是退出时机) 测试: - cargo check ✅
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
Closes #169
QaHotkeyMonitor drop 在 macOS 调 Carbon RemoveEventHotKey 要求主线程。`RunEvent::Exit` 不保证主线程 → drop 漏到 tokio worker → SIGTRAP。
修复
`coordinator.rs::stop_qa_hotkey_listener` 把 `.take()` 包到 `run_on_main_thread`;`AppHandle` None 时直接 drop(极端 shutdown 兜底)。
测试
@codex review。