yanglimingcn commented on PR #2476: URL: https://github.com/apache/brpc/pull/2476#issuecomment-1882742759
> > > LGTM > > > > > > 拆分线程池后,有些原来服务于一个线程池的routine现在服务于多个线程池,如果这个routine内部有bthread锁,就会发生问题,因为线程池之间不能被唤醒。另外就是跨线程池创建协程,使用了bthread锁。 brpc内部的routine有这种case吗?我看多数用的butil:Mutex,那内部routine使用锁的原则是怎么样的? 目前我能搜到的使用bthread::Mutex(bthread_mutex_*)的地方有,stream.cpp,id.cpp,有没有风险。 > > 线程池之间,能否支持唤醒呢?就像之前 pthread和bthread 也可以相互唤醒,可能需要调整下butex的相关逻辑 我感觉线程池之间不需要这么做了,如果线程池之间有共享的内容,就退化到pthread_mutex就可以了。 -- 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]
