lpt 1.0.0

Low priority thread
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented2 out of 2 items with examples
  • Size
  • Source code size: 9.54 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.11 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • hinto-janai/lpt
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hinto-janai

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