Skip to content
New issue

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

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

Already on GitHub? # to your account

support bthread primitive cross different worker pools #2551

Conversation

yanglimingcn
Copy link
Contributor

What problem does this PR solve?

Issue Number:

Problem Summary:

What is changed and the side effects?

Changed:

Side effects:

  • Performance effects(性能影响):

  • Breaking backward compatibility(向后兼容性):


Check List:

  • Please make sure your changes are compilable(请确保你的更改可以通过编译).
  • When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
  • Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).

@yanglimingcn
Copy link
Contributor Author

@wwbmmm 这个PR有一个点没有处理到
int TaskGroup::interrupt(bthread_t tid, TaskControl* c) 这个函数里面在sleep_id != 0,这部分,因为无法拿到tid原来的执行上下文信息,所以没有办法得到正确的tag分组。你看这块怎么处理合适呢?

@yanglimingcn yanglimingcn force-pushed the feature/bthread_primitive_between_different_tag branch from 3b43cd0 to ba3eac5 Compare March 2, 2024 01:12
@yanglimingcn
Copy link
Contributor Author

@wwbmmm 这个PR有一个点没有处理到 int TaskGroup::interrupt(bthread_t tid, TaskControl* c) 这个函数里面在sleep_id != 0,这部分,因为无法拿到tid原来的执行上下文信息,所以没有办法得到正确的tag分组。你看这块怎么处理合适呢?

修改了一下,给bthread_interrupt加了一个tag参数,代表用户希望在那个tag分组上执行。

@yanglimingcn yanglimingcn force-pushed the feature/bthread_primitive_between_different_tag branch from ba3eac5 to 0b1d106 Compare March 7, 2024 09:07
@yanglimingcn
Copy link
Contributor Author

@wwbmmm 辛苦有时间review这个PR

@yanglimingcn yanglimingcn force-pushed the feature/bthread_primitive_between_different_tag branch from 0b1d106 to 84fbbe9 Compare March 7, 2024 11:18
@wwbmmm
Copy link
Contributor

wwbmmm commented Mar 11, 2024

LGTM

@wwbmmm wwbmmm merged commit cbbb823 into apache:master Apr 1, 2024
18 checks passed
@ketor
Copy link
Contributor

ketor commented Apr 27, 2024

@yanglimingcn
请问这个PR是意味着可以跨tag使用bthread同步原语了吗? 使用中是否还有需要在注意的问题呢?

@yanglimingcn
Copy link
Contributor Author

@yanglimingcn 请问这个PR是意味着可以跨tag使用bthread同步原语了吗? 使用中是否还有需要在注意的问题呢?

是的,使用过程中没有什么要注意的,和原来的语义保持一致。

@ketor
Copy link
Contributor

ketor commented May 3, 2024

@yanglimingcn 请问这个PR是意味着可以跨tag使用bthread同步原语了吗? 使用中是否还有需要在注意的问题呢?

是的,使用过程中没有什么要注意的,和原来的语义保持一致。

太赞了! 准备开始使用bthread worker pool的特性了。

@yanglimingcn
Copy link
Contributor Author

@yanglimingcn 请问这个PR是意味着可以跨tag使用bthread同步原语了吗? 使用中是否还有需要在注意的问题呢?

是的,使用过程中没有什么要注意的,和原来的语义保持一致。

太赞了! 准备开始使用bthread worker pool的特性了。

有问题可以随时沟通

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants