Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed the bug that method CurrentTaskFinished was executed multiple times by multiple threads #1084

Merged
merged 5 commits into from
Sep 15, 2024

Conversation

iamscottxu
Copy link
Contributor

@iamscottxu iamscottxu commented Sep 8, 2024

修复了 #1082#1083 提及的bug。

另外,照此方法修改后,ConcurrentExecuteThreadCount_concurrentExecuteThreadCount本质上已经没有用处了,如果后续不需要知道当前正在运行的Tasks数量,可将其删除。StartTask会反复执行,还是需要使用ConcurrentExecuteThreadCount判断上一个任务的线程是否已经完全退出)

@Scighost
Copy link
Owner

Scighost commented Sep 8, 2024

很可惜,修改后的代码没能通过测试,一键修复过程完成校验后,无法进入到下载流程。

…re were multiple steps of the task when installing the game

Signed-off-by: OsakaRuma <[email protected]>
@iamscottxu
Copy link
Contributor Author

iamscottxu commented Sep 8, 2024

抱歉,无法进入下载流程的原因是没有考虑到StartTask会被多次执行,加了一行State == None的判断逻辑导致的,修改后使用_concurrentExecuteThreadCount > 0进行判断,达到同样的效果,解决此问题。

@iamscottxu iamscottxu changed the title [bug] fixed the bug that method CurrentTaskFinished was executed multiple times by multiple threads fix: fixed the bug that method CurrentTaskFinished was executed multiple times by multiple threads Sep 8, 2024
@Scighost Scighost merged commit acc7149 into Scighost:main Sep 15, 2024
4 checks passed
@iamscottxu iamscottxu deleted the bug_fix branch September 17, 2024 02:27
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.

2 participants