lpt 0.1.0

Low priority thread
Documentation

Low Priority Thread

CI

This is a 1-function crate that sets the calling thread's priority to the lowest platform-specific value possible.

let result: Result<(), ()> = lpt::lpt();

if result.is_ok() {
	println!("successfully set current thread to lowest possible priority");
}

Windows

Uses SetThreadPriority() with THREAD_PRIORITY_IDLE (-15).

Unix

Uses libc::nice() with the max nice level.

  • On macOS and *BSD: +20
  • On Linux: +19