【问题标题】:Increase process priority with pthread_win32使用 pthread_win32 提高进程优先级
【发布时间】:2023-03-11 18:06:01
【问题描述】:

环境:Win XP、Visual C++

我正在使用 pthread_win32 库在我的程序中实现线程,并且我想将我的进程(程序)优先级提高到 HIGH_PRIORITY_CLASS。库中有没有允许这种操作的函数?

否则,是否可以将SetPriorityClass函数与`pthread_win32一起使用,或者我必须使用win线程来确保一些兼容性?

【问题讨论】:

    标签: c++ windows multithreading pthreads


    【解决方案1】:

    您可以获得一个本机线程句柄,在该句柄上使用pthread_getw32threadhandle_np 调用SetPriorityClass

    【讨论】:

      猜你喜欢
      • 2017-02-17
      • 2011-06-25
      • 1970-01-01
      • 1970-01-01
      • 2014-11-26
      • 1970-01-01
      • 2011-12-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多