Callback functions for shutdown()?
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 2.2k
- 派生
- 242
- 平均合并
- 11 分钟
- 30 天内合并 PR
- 1
描述
Hi, I encountered an issue that seems need some customization to the shutdown() function:
I have a separate thread initiated and detached before polyscope::init() -- a server listening from other software for sending geometries in.
The server use a shared_ptr<UIState> which is also used in the main().
Now if I close the main window of polyscope, there's always an error pointing to the ~shared_ptr<UIState>.
I'm not 100% sure what happened there, but it seems the main thread delete the shared_ptr<UIState> before the other thread exit. And when the server tries to delete that shared_ptr, it points to nowhere?
I assume manually exit the separate thread before the main should help.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
阅读报告中描述的 shutdown() 入口点以及 UIState 的所有权和生命周期路径。确定 shutdown hook 如何能够让 detached server 在共享状态被销毁之前停止,然后验证关闭主窗口时不会出现报告中的 shared_ptr 错误。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp
- 领域
- desktop
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100