使用 CommonAPI 编写服务器时C++服务器进程中创建了多少个线程?

How many threads are created in server process when writing a server using C++ CommonAPI?

本文关键字:服务器 多少 创建 线程 进程 CommonAPI C++ 使用      更新时间:2023-10-16

我使用通用 API (https://docs.projects.genivi.org/ipc.common-api-tools/3.1.3/html/CommonAPICppUserGuide.html( 编写了一个服务。在内部,我的commonAPI使用Dbus。该服务提供2 种方法和 1 种选择性广播。当我运行该服务时,我可以看到为该服务创建了7 个线程。 我已经浏览了 commonAPI 用户指南的某些部分,但无法了解创建的线程数背后的概念。 所以我的查询是:

如何确定由于 commonAPI 创建的线程数?这是否取决于连接到服务的客户端数量?它是否取决于方法的数量,服务接口中的广播?

如果其他人对此感兴趣,您可以使用 vsomeip.json 配置文件中的 num_dispatchers 选项设置线程数。

看这里: https://docs.projects.genivi.org/vSomeIP/2.0.1/html/README.html#_configuration_file_structure