cool-threads branch: waking the main loop from the subscript queue
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
The issue points to ui_subscript.cpp lines 227, 247, 282, 354, 364, and 452, and engine/system/win/sys_main.cpp lines 697–704. Read the feat/cool-threads branch at commit f36c1d0 alongside the referenced main loop to understand how its worker queue and event handling fit together. The reported work spans waking the loop, the unused finished flag, and Lua state access across threads; clarify scope with the maintainer before estimating completion.
由索引模型根据 Issue 内容生成。
描述
About the WIP branch feat/cool-threads on your fork (at f36c1d0), since issues are turned off there. A few spots I noticed while reading.
The new queue is a good place to wake the main loop. A glfwPostEmptyEvent() after each push (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L227, https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L247, https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L354) would let the main loop wait in glfwWaitEventsTimeout instead of glfwPollEvents (https://github.com/PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic/blob/421d18871cccb2696b5a57e6d72a9fc22fa641ae/engine/system/win/sys_main.cpp#L697-L704). Right now the main thread still picks the messages up by polling once per frame (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L364).
finished is set at https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L282 but nothing reads it anymore.
GetScriptMemory calls lua_gc on the worker's state from the main thread while the worker runs (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L452). Same as on master.
- 主要语言
- C++
- 星标
- 23
- 派生
- 69
- 平均合并
- 2 小时 50 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 38/100
-
难度 4/5 3-5 天 新手友好度 42/100
-
难度 4/5 1-2 天 新手友好度 48/100
-
难度 3/5 1-2 天 新手友好度 72/100
查看 PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic 的全部 Issue
相似的 Issue
-
enhancement help wanted
难度 2/5 1-3 小时 新手友好度 82/100
-
difficulty:easy prio:normal type:bug
难度 2/5 1-3 小时 新手友好度 78/100
NatronGitHub/openfx-supportext#326 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
zucch1/android-auto-jetson#293 ·
维护者通常 1 天内回复
-
lfortran -E exits with status 0 after a C preprocessor error (#error, wrong macro argument count)未关闭bug low priority preprocessor
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
difficulty:easy enhancement prio:low
难度 2/5 1-3 小时 新手友好度 72/100
NatronGitHub/openfx-misc#502 ·
维护者通常 1 天内回复