thread-priority 0.1.0

Library for managing threads priority and schedule policies
Documentation

thread-priority

Build status Crates Docs MIT licensed

A simple library to control thread schedule policies and thread priority via libc crate/pthread.

Example

Setting thread priority to minimum:


extern crate thread_priority;
use thread_priority::*;

fn main() {
    let thread_id = thread_native_id();
    assert!(set_thread_priority(thread_id,
                                ThreadPriority::Min,
                                ThreadSchedulePolicy::Normal(NormalThreadSchedulePolicy::Normal)).is_ok());
}

License

This project is [licensed under the MIT license] (https://github.com/vityafx/thread-priority/blob/master/LICENSE).