mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Implement custom QoS-aware thread pool
This code replaces the thread pool implementation we were using previously (from the `threadpool` crate). By making the thread pool aware of QoS, each job spawned on the thread pool can have a different QoS class. This commit also replaces every QoS class used previously with Default as a temporary measure so that each usage can be chosen deliberately.
This commit is contained in:
parent
f6e3a87bf9
commit
2924fd2213
14 changed files with 184 additions and 93 deletions
|
@ -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 = stdx::thread::Builder::new(stdx::thread::QoSClass::Utility)
|
||||
let thread = stdx::thread::Builder::new(stdx::thread::QoSClass::Default)
|
||||
.name("VfsLoader".to_owned())
|
||||
.spawn(move || actor.run(receiver))
|
||||
.expect("failed to spawn thread");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue