datatechboost commented on issue #1229:
URL: https://github.com/apache/incubator-brpc/issues/1229#issuecomment-891492822


   > > > 在brpc框架下,锁内RPC属于未定义行为,不管换成什么锁,问题还是一样
   > > 
   > > 
   > > 你好,可以详细解释一下这个的原因吗? 
比如我们加了一个bthread_mutex锁然后发起rpc,rpc正常返回(或超时返回)后我们继续执行,为什么是不行的? ps: 
我使用时看起来那个rpc一直(按照早超时了)不返回,不知道是什么原因。
   > 
   > 锁内rpc容易把所有worker都锁住,这样持锁的rpc将没有worker来执行导致锁永远无法释放
   
   感谢你的回复,首先说明一下设计上锁内rpc确实并发度不好,想理解的更深入一层。
   使用bthread_mutex的话,worker是否不会被阻塞,如果不会阻塞是否有其它原因,我猜测是因为可运行任务的抢占有关,但是我自己没有不理顺。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to