1
A
回答
3
的WINAPI有一个名为CreateProcess()
功能,允许优先级的规格:
dwCreationFlags [in] The flags that control the priority class and the creation of the process. For a list of values, see Process Creation Flags. This parameter also controls the new process's priority class, which is used to determine the scheduling priorities of the process's threads. For a list of values, see GetPriorityClass. If none of the priority class flags is specified, the priority class defaults to NORMAL_PRIORITY_CLASS unless the priority class of the creating process is IDLE_PRIORITY_CLASS or BELOW_NORMAL_PRIORITY_CLASS. In this case, the child process receives the default priority class of the calling process.
2
您可以在应用程序的主线程中使用SetThreadPriority函数()
1
我认为这是一个更完整的答案:
三个不同的选项(这些不是步骤):
- 在期间CreateProcess,指定进程优先级CLASS(单个线程优先级从进程优先级派生)。
- 启动应用程序后,使用SetPriorityClass。这可以让您随意更改优先级CLASS。
- 通过SetThreadPriority更改单个线程优先级。这些按照“基础”优先级CLASS进行升降。
有关更多信息,请参见MSDN。
相关问题
- 1. 有没有办法通过LDAP命令行执行系统命令?
- 2. 有没有办法让现有的cmd窗口执行命令?
- 3. 有没有办法让gradle执行$ path中的命令行
- 4. 有没有办法使用java来执行一系列的命令行
- 5. 有没有办法显示Visual Studio执行的Git命令?
- 6. 有没有办法看到SmartGit执行的shell命令?
- 7. 有没有办法检索Eclipse执行的git命令?
- 8. 有没有办法将Web Worker设置为低优先级?
- 9. Android有没有办法在adb中显示进程优先级?
- 10. 有没有办法列出用户可以执行的所有命令(KSH)?
- 11. 有没有办法查看TortoiseSVN正在执行哪些命令?
- 12. Devart dotconnect - 有没有办法强制执行命令?
- 13. 有没有办法从Eclipse执行一个linux命令
- 14. 有没有办法让JavaScript执行一个PHP命令?
- 15. 有没有办法在文件改变后执行命令?
- 16. cloud-init有没有办法强制执行命令?
- 17. 有没有办法查看eclipse执行哪些命令?
- 18. 有没有办法将命令行参数传递给spec/rspec?
- 19. FTYPE/ASSOC的优先级和命令行
- 20. 如何确定terraform执行优先级的优先级
- 21. perl系统命令执行
- 22. DOS级联命令优先
- 23. 有没有办法指定八度的命令行宽度?
- 24. Java无法执行系统命令(Ubuntu)
- 25. php无法执行系统命令
- 26. 只有先前没有执行过使用puppet命令才能运行命令
- 27. 如何在低优先级的Android/Java上执行Linux命令?
- 28. TestNG中的执行顺序没有使用优先级
- 29. postgresql命令没有执行
- 30. WPF,命令没有执行