Код: Выделить всё
void SetPriority(int id, int priority, int policy) {
bool ret = true;
sched_param sch_params;
sch_params.sched_priority = 20;
pthread_t p;
p.p = threads_[id].native_handle();
if (pthread_setschedparam(p, SCHED_FIFO, &sch_params)) {
std::cerr
Подробнее здесь: [url]https://stackoverflow.com/questions/51100861/stdthread-with-pthread-setschedparam-with-c-11[/url]