lpt

Crates.iolpt
lib.rslpt
version1.0.0
sourcesrc
created_at2023-10-29 17:39:46.664222
updated_at2023-11-16 20:26:54.903475
descriptionLow priority thread
homepage
repositoryhttps://github.com/hinto-janai/lpt
max_upload_size
id1017643
size5,950
(hinto-janai)

documentation

https://docs.rs/lpt

README

Low Priority Thread

CI crates.io docs.rs

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

// Set the current thread to the lowest priority.
//
// This function returns () and will never fail.
lpt::lpt();

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
Commit count: 2

cargo fmt