apache / brpc

brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
https://brpc.apache.org
Apache License 2.0
16.56k stars 3.98k forks source link

Implement rwlock in bthread. #2748

Closed ketor closed 2 months ago

ketor commented 2 months ago

What problem does this PR solve?

Issue Number:

Problem Summary:

What is changed and the side effects?

Changed: 实现brpc中缺失的rwlock

Side effects:


Check List:

ketor commented 2 months ago

跟#1031 的实现一样?

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

这个问题解决了吗?

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