Add proof-of-concept QoS implementation

This commit is contained in:
Luna Razzaghipour 2023-05-20 22:29:32 +10:00
parent bb78059be4
commit ca6461c143
No known key found for this signature in database
14 changed files with 254 additions and 23 deletions

View file

@ -21,7 +21,7 @@ use walkdir::WalkDir;
pub struct NotifyHandle {
// Relative order of fields below is significant.
sender: Sender<Message>,
_thread: jod_thread::JoinHandle,
_thread: stdx::thread::JoinHandle,
}
#[derive(Debug)]
@ -34,7 +34,7 @@ impl loader::Handle for NotifyHandle {
fn spawn(sender: loader::Sender) -> NotifyHandle {
let actor = NotifyActor::new(sender);
let (sender, receiver) = unbounded::<Message>();
let thread = jod_thread::Builder::new()
let thread = stdx::thread::Builder::new(stdx::thread::QoSClass::Utility)
.name("VfsLoader".to_owned())
.spawn(move || actor.run(receiver))
.expect("failed to spawn thread");