fix(push): pass stale reaper thread by pointer - #86
Draft
ULookup wants to merge 1 commit into
Draft
Conversation
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.
关联 Issue
Closes #82
目标版本:
3.0-dev堆叠基线:#85(
fix/62-standardize-secret-injection)变更摘要
仅修正
PushServerBuilder::build()的 stale-route reaper 线程交接:builder 继续拥有std::thread,向只借用的PushServer传递成员地址,而不是错误地移动线程对象。根因
PushServer构造器第八个参数是std::thread*,调用点却传入std::thread,因此 Push 服务在 3.0 开发线上无法编译。RED / GREEN
RED:
cmake --build build-issue-62 --target push_server -j2稳定失败于
std::thread无法转换为std::thread*。GREEN:
cmake -S . -B /tmp/chatnow-issue82-main -DCMAKE_BUILD_TYPE=Debug && cmake --build /tmp/chatnow-issue82-main --target push_server -j2结果:
[100%] Built target push_server。同时通过
git diff --check,最终差异仅 1 个文件、1 行替换。生命周期与风险
main中先于 server 创建,按逆序析构,借用指针在 server 运行与关停期间保持有效。PushServer仍只负责设置停止标志并 join。CI 边界
本 PR 不修改
.github/workflows/ci.yml。CI 与 clean-slate Compose 的效率/效果改进由 #78 的独立 PR 负责。已知堆叠关系
PR #84 当前包含相同的一行修复作为其更大 Push 变更的一部分;#82 独立合入后,#84 需要由其所有者 rebase 并丢弃重叠 hunk。本 PR 不改写 #84。
审核状态
保持 Draft;等待 #85 与本 PR CI 证据后由人工决定 review-ready,本代理不会合并。