相关疑难解决方法(0)

gRPC Python thread_pool与max_concurrent_rpcs

启动Python时grpc.server,线程池maximum_concurrent_rpcsmax_workers使用的线程池有什么区别。如果需要maximum_concurrent_rpcs=1,是否仍应向线程池提供多个线程?

换句话说,我应该匹配maximum_concurrent_rpcs我的max_workers,还是应该提供比最大并发RPC多的工作器?

server = grpc.server(
    thread_pool=futures.ThreadPoolExecutor(max_workers=1),
    maximum_concurrent_rpcs=1,
)
Run Code Online (Sandbox Code Playgroud)

python concurrent.futures grpc

4
推荐指数
1
解决办法
1992
查看次数

标签 统计

concurrent.futures ×1

grpc ×1

python ×1