Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.Echo start multi thread,how can I start only one thread? #377

Closed
ouclbc opened this issue Apr 11, 2024 · 6 comments
Closed

client.Echo start multi thread,how can I start only one thread? #377

ouclbc opened this issue Apr 11, 2024 · 6 comments

Comments

@ouclbc
Copy link

ouclbc commented Apr 11, 2024

No description provided.

@Barenboim
Copy link
Contributor

Barenboim commented Apr 11, 2024

这个是workflow的全局配置,在workflow的global settings里,把 poller_threads和handler_threads都改成1

int main()
{
    struct WFGlobalSettings settings = GLOBAL_SETTINGS_DEFAULT;
    settings.poller_threads = 1;
    settings.handler_threads = 1;
    WORKFLOW_library_init(&settings);
    ...
}

@ouclbc
Copy link
Author

ouclbc commented Apr 12, 2024

谢谢,但是我按照上面的在代码里面修改,还是有三个线程,还有其他地方需要修改么?

@holmes1412
Copy link
Contributor

@ouclbc hi,你是说进程整体有3个线程么?是不是有一个是你的主线程?

@ouclbc
Copy link
Author

ouclbc commented Apr 12, 2024

不是主线程,我开了一个线程,然后调用获取接口时查看有三个。
19596 u0_a114 RT -10 5.3G 133M 100M S 1.6 2.3 0:00.02 getPoseThread org.freedesktop.monado.openxr_runtime.out_of_process
19598 u0_a114 RT -10 5.3G 133M 100M S 1.0 2.3 0:00.01 getPoseThread org.freedesktop.monado.openxr_runtime.out_of_process
19597 u0_a114 RT -10 5.3G 133M 100M S 0.6 2.3 0:00.00 getPoseThread org.freedesktop.monado.openxr_runtime.out_of_process

@Barenboim
Copy link
Contributor

你开了一个,然后poller和handler各一个?所以是三?

@ouclbc
Copy link
Author

ouclbc commented Apr 12, 2024

了解了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants