GOGOYAO commented on issue #1099: URL: https://github.com/apache/incubator-brpc/issues/1099#issuecomment-672860507
> 【那个bthread用std::mutex导致死锁的问题】请问这个是什么问题,现有的 issue 上也没有搜到 https://github.com/apache/incubator-brpc/blob/master/docs/cn/bthread.md “但这个机制更多是为了规避在一些极端情况下的死锁, 比如所有的用户代码都lock在一个pthread mutex上, 并且这个mutex需要在某个RPC回调中unlock, 如果所有的worker都被阻塞, 那么就没有线程来处理RPC回调了, 整个程序就死锁了. 虽然绝大部分的RPC实现都有这个潜在问题, 但实际出现频率似乎很低, 只要养成不在锁内做RPC的好习惯, 这是完全可以规避的.” ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
