Closed wanghenshui closed 6 months ago
first of all, babylon::Executor is mostly an SPI to unify different thread pool implementations. For example, the babylon::anyflow DAG engine, when using in brpc server will use BthreadExecutor but when using in Apollo will use CyberExecutor.
When it comes to babylon::ConcurrentBoundedQueue vs folly::UnboundedQueue, I prefer use Bounded one for thread pool. But in production environment, we always need to set a concurrent limit to prevent non-recoverable overload. This makes auto grow rarely useful.
For the futex api, the new bitset style can compact set of futex into one int, but seems no performance difference there.
folly one is a more feature-rich and production-ready thread pool, so if some one need a standard thread pool, that is a good choice. But i usually prefer some use-level coroutine over the standard thread pool, if that is possible.
thank you for your explation
first of all, babylon::Executor is mostly an SPI to unify different thread pool implementations. For example, the babylon::anyflow DAG engine, when using in brpc server will use BthreadExecutor
I could not found the BthreadExecutor
source code, could open source it soon or later?
inside baidu, we have a repo take depends on both babylon and brpc and tools like BThreadExecutor and some RPC enhancement all placed there.
after babylon is open sourced, maybe i could place them in brpc open source repo and make brpc take dependency on babylon. But need some time to find a right way to do that
inside baidu, we have a repo take depends on both babylon and brpc and tools like BThreadExecutor and some RPC enhancement all placed there.
after babylon is open sourced, maybe i could place them in brpc open source repo and make brpc take dependency on babylon. But need some time to find a right way to do that
thank you! i have a brpc store service, really need that executor to make fully async
FUTEX_WAIT_BITSET