jiangdongzi commented on issue #1724: URL: https://github.com/apache/incubator-brpc/issues/1724#issuecomment-1076339851
> bthread 和 pthread 是 M:N 的关系,也就是说一个 pthread 上可以运行多个 bthread,并且相对于建立一个pthred,建立一个bthread的时间是非常快的,同时由于 worksteal 的调度方式,可以高效的利用多核。 具体可以参考:[bthread](https://github.com/apache/incubator-brpc/blob/master/docs/cn/bthread.md) 和 [bthread-or-not](https://github.com/apache/incubator-brpc/blob/master/docs/cn/bthread_or_not.md) 两篇文档,应该可以解答你的疑问。 我知道建立bthread很快, 但是可以使用pthread线程池啊. 看到bthread的调度和pthead的调度时间都是3us左右, 挺失落的. 另外linux内核内也有多核任务 balance 也可以高效利用多核的. -- 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]
