gpt4 book ai didi

c++ - 默认计划策略 : omitting use of pthread_attr_setschedpolicy

转载 作者:太空宇宙 更新时间:2023-11-04 11:21:46 26 4
gpt4 key购买 nike

如果我不使用 pthread_attr_setschedpolicy 设置线程属性对象的调度策略属性,会发生什么情况?如果我直接继续并从主循环中创建和取消线程怎么办?在什么情况下系统需要在从应用程序创建任何线程之前设置 pthread_attr_setschedpolicy?如果我不设置调度程序策略以防系统要求应用程序进行设置,该怎么办?

最佳答案

线程的默认策略将适用于这种情况。

检查这个。 POSIX thread scheduling policies

有关内核级别的更多详细信息,您可以查看以下链接

http://oreilly.com/catalog/linuxkernel/chapter/ch10.html

关于c++ - 默认计划策略 : omitting use of pthread_attr_setschedpolicy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17748354/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com