Skip to content

Fix concurrent progress event callbacks and document emit behavior - #5

Merged
geekMus merged 2 commits into
mainfrom
dev
Nov 17, 2026
Merged

geekMus merged 2 commits into
mainfrom
dev

Conversation

@geekMus

@geekMus geekMus commented Nov 17, 2026

Copy link
Copy Markdown
Owner

No description provided.

runUnits 里每个 worker 各自 notify 进度事件,而 done 是加锁累加的:两个 worker 同时收尾时,
done=2 的事件可能先于 done=1 出去,界面进度条会往回跳;回调并发还让测试里的收集函数在
append 上打架,TestRemoteProgressReportsDoneNotUploaded 偶发「只覆盖了 5 处引用」。

改成在累加 done 的同一把锁里发事件,顺带把 emit 的并发约定写进注释。
@geekMus
geekMus merged commit d5dd91d into main Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant