fix: execution_domain::schedule_execution() 偶发 get 到空 hashmap guard#6
Open
pointertobios wants to merge 2 commits into
Open
fix: execution_domain::schedule_execution() 偶发 get 到空 hashmap guard#6pointertobios wants to merge 2 commits into
pointertobios wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 旨在修复 execution_domain::schedule_execution() 偶发拿到空 hash_map guard(m_executions.get(id) 为空)的问题,整体方向是在 execution 结束/脱离时更彻底地清理调度器侧的状态,避免后续调度或唤醒再命中已脱离的 execution。
Changes:
- 调整
worker::run_once()在 execution 结束时的清理顺序(domain/scheduler 的 detach 调用顺序变更)。 dynprio_scheduler::detach_suspended_execution()增加对m_preawake_executions的清理。cycle_scheduler增强 detach/awake/suspend 路径对preawaken/detached的处理,并尝试清理 index 映射。
注意:改动涉及
asco/core的并发/调度/生命周期语义路径;请不要仅依赖本 review 的结论,务必由作者自行逐路径核对不变量、失败路径与竞态窗口(尤其是 wake 传递与 detach 时序)。
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| asco/core/worker.cpp | 调整 execution 结束后的 domain/scheduler 清理调用顺序。 |
| asco/core/task/dynprio_scheduler.cpp | detach 时额外清理 preawake 集合以减少脏唤醒残留。 |
| asco/core/task/cycle_scheduler.h | 修正/增强 detached & preawaken 相关状态处理,并尝试同步清理索引映射。 |
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 #5
改动类型
fix
AI 使用披露
本次改动中,AI 参与了哪些部分: