[−][src]Crate thread_priority
Thread priority. A library for changing thread's priority.
Uses libpthread to work with threads.
Usage
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()); }
Structs
| ScheduleParams |
Enums
| Error | A error type |
| NormalThreadSchedulePolicy | Normal (usual) schedule policies |
| RealtimeThreadSchedulePolicy | The following "real-time" policies are also supported, for special time-critical applications that need precise control over the way in which runnable processes are selected for execution |
| ThreadPriority | Thread priority enumeration |
| ThreadSchedulePolicy | Thread schedule policy definition |
Functions
| set_thread_priority | Sets thread's priority and schedule policy |
| set_thread_schedule_policy | Sets thread schedule policy. |
| thread_native_id | Returns current thread id (pthread) |
| thread_schedule_policy | Returns policy parameters (schedule policy and other schedule parameters) for current process |
| thread_schedule_policy_param | Returns policy parameters (schedule policy and other schedule parameters) |