Expand description
§Low Priority Thread
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
Functions§
- lpt
target_family="unix"
- Set the calling thread to the lowest possible priority