How to give priority to privileged thread in mutex locking?

后端 未结 8 1339
失恋的感觉
失恋的感觉 2020-12-01 02:48

First of all: I am completely a newbie in mutex/multithread programming, so sorry for any error in advance...

I have a program that runs multiple threads. The threads

8条回答
  •  感动是毒
    2020-12-01 03:41

    On linux you can check this man: pthread_setschedparam and also man sched_setscheduler

    pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param);

    Check this also for c++2011: http://msdn.microsoft.com/en-us/library/system.threading.thread.priority.aspx#Y78

提交回复
热议问题