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

bthread 支持唤醒到原来的 task_group #2728

Closed wory117 closed 3 months ago

wory117 commented 3 months ago

Is your feature request related to a problem? (你需要的功能是否与某个问题有关?) bthread 中用锁或者条件变量,唤醒时会调度到当前 tg(如果当前不是协程环境,会随机调度到一个 tg),请问是否可以支持唤醒的时候能调度到原来的 tg

Describe the solution you'd like (描述你期望的解决方法)

Describe alternatives you've considered (描述你想到的折衷方案)

Additional context/screenshots (更多上下文/截图)

yanglimingcn commented 3 months ago

群里有人问了同样的问题,最新的版本是这个逻辑。