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:

```rust,no_run

extern crate threadpriority; use threadpriority::*;

fn main() { let threadid = threadnativeid(); assert!(setthreadpriority(threadid, 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).