Skip to content

Implement rwlock in bthread.#2748

Closed
ketor wants to merge 1 commit into
apache:masterfrom
ketor:wip-rwlock
Closed

Implement rwlock in bthread.#2748
ketor wants to merge 1 commit into
apache:masterfrom
ketor:wip-rwlock

Conversation

@ketor
Copy link
Copy Markdown
Contributor

@ketor ketor commented Aug 27, 2024

What problem does this PR solve?

Issue Number:

Problem Summary:

What is changed and the side effects?

Changed:
实现brpc中缺失的rwlock

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.(请遵循贡献者准则).

@ketor ketor force-pushed the wip-rwlock branch 2 times, most recently from 80e30ab to 7c7db55 Compare August 27, 2024 18:34
Signed-off-by: Ketor <d.ketor@gmail.com>
Copy link
Copy Markdown
Contributor

@chenBright chenBright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1031 的实现一样?

这个实现性能有很大优化吧。这个无脑 butex 唤醒有问题吧?理想状态下应该有个 flag 标识有没有真的有 bthread 在等待。

这个问题解决了吗?

@ketor
Copy link
Copy Markdown
Contributor Author

ketor commented Sep 6, 2024

#1031 的实现一样?

这个实现性能有很大优化吧。这个无脑 butex 唤醒有问题吧?理想状态下应该有个 flag 标识有没有真的有 bthread 在等待。

这个问题解决了吗?

好像是差不多的。看起来你已经在实现了,这个PR可以关掉了。现在在开发的项目是编译时给brpc打patch实现rwlock的,所以希望brpc能内置rwlock的实现。

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