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

workbranch::mission里访问workbranch::decline不用加锁吗? #30

Open
FlyinCow opened this issue Aug 13, 2023 · 1 comment
Open

Comments

@FlyinCow
Copy link

include/workspace/workbranch.h:232里:

 while (true) {
            if (decline <= 0 && tq.try_pop(task)) { // 访问decline但是没有锁

decline应该是待删除的线程数吧,这里读它不用加锁吗,是为什么?

@CodingHanYa
Copy link
Owner

不用哦

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

No branches or pull requests

2 participants