process cannot exit#371
Conversation
概览对 变更内容线程签名清理与关闭消息控制流修复
估算代码审查工作量🎯 2 (Simple) | ⏱️ ~8 minutes 小诗
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Augment PR SummarySummary: Ensures the graphics window close event reaches default processing so the UI message-loop thread can terminate and the process exits cleanly. Changes: Forwards 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/graphics.cpp (1)
102-102: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win把
messageloopthread放进ege命名空间。这两个实现点现在仍然暴露在全局命名空间里,不符合仓库对 C/C++ 实现位置的约束。As per coding guidelines,
**/*.{h,hpp,cpp,cc,cxx}: All implementations must be inegenamespace, with public API in global namespace.Also applies to: 956-956
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/graphics.cpp` at line 102, `messageloopthread` is still declared in the global namespace, but this implementation must live under `ege` per the repository namespace rule. Move the declaration/definition into the `ege` namespace in the graphics implementation, and update any related references in the same area so the internal implementation stays namespaced while the public API remains global.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/graphics.cpp`:
- Line 102: `messageloopthread` is still declared in the global namespace, but
this implementation must live under `ege` per the repository namespace rule.
Move the declaration/definition into the `ege` namespace in the graphics
implementation, and update any related references in the same area so the
internal implementation stays namespaced while the public API remains global.
进程在窗口关闭后由于关闭事件实际上没有成功分发,导致进程无法退出。
这是我引入 std::thread 并在 _graph_setting 析构时 join thread 暴露出来的问题,之前可能进程都是异常退出的。
顺便把 messageloopthread 这个没有必要的 LPVOID 参数直接改成 _graph_setting *
Summary by CodeRabbit