Registry / utility / thread-priority

thread-priority

JSON →
library3.0.0rscratesunverified

Library for managing threads priority and schedule policies.

# Cargo.toml [dependencies] thread-priority = "3.0.0"
INSTALL
IMPORT
SIG · THREAD-PRIORITY
T
thread-priority
utilityrustv3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

set_current_thread_priority
use thread_priority::set_current_thread_priority;

Sets the priority of the current thread.

use thread_priority::*; fn main() { let priority = ThreadPriority::Crossplatform(ThreadPriorityValue::try_from(5).unwrap()); set_current_thread_priority(priority).unwrap(); println!("Priority set!"); }
Debug
Known issues
gotchaPlatform-specific behavior: priority values may be ignored or mapped differently on some OSes.
fix
Test on target platforms and use crossplatform priority values.
affects: >=3.0.0
Upgrade
Version history
3.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
thread-priority — cargo add thread-priority · libregistry