简体   繁体   English

gRPC C++ 异步客户端:理解线程

[英]gRPC C++ Async Client: Understanding threading

由于我找不到任何答案,我发布了它,在 gRPC 异步客户端中,是否会在生成请求时自动生成线程,或者必须为每个请求手动创建线程?

Please take a look at an example .请看一个例子

In the Async completion queue based model, the application is responsible for creating and managing the threads on their own, and the application then provides these threads to gRPC through the completion queue's Next() method to drive the internal polling engine so that work can be done.在基于 Async 完成队列的模型中,应用程序自己负责创建和管理线程,然后应用程序通过完成队列的Next()方法将这些线程提供给 gRPC 来驱动内部轮询引擎,以便工作可以完毕。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM