mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Add proof-of-concept QoS implementation
This commit is contained in:
parent
bb78059be4
commit
ca6461c143
14 changed files with 254 additions and 23 deletions
|
@ -77,7 +77,7 @@ impl fmt::Display for FlycheckConfig {
|
|||
pub struct FlycheckHandle {
|
||||
// XXX: drop order is significant
|
||||
sender: Sender<StateChange>,
|
||||
_thread: jod_thread::JoinHandle,
|
||||
_thread: stdx::thread::JoinHandle,
|
||||
id: usize,
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ impl FlycheckHandle {
|
|||
) -> FlycheckHandle {
|
||||
let actor = FlycheckActor::new(id, sender, config, workspace_root);
|
||||
let (sender, receiver) = unbounded::<StateChange>();
|
||||
let thread = jod_thread::Builder::new()
|
||||
let thread = stdx::thread::Builder::new(stdx::thread::QoSClass::Utility)
|
||||
.name("Flycheck".to_owned())
|
||||
.spawn(move || actor.run(receiver))
|
||||
.expect("failed to spawn thread");
|
||||
|
@ -395,7 +395,7 @@ struct CargoHandle {
|
|||
/// The handle to the actual cargo process. As we cannot cancel directly from with
|
||||
/// a read syscall dropping and therefore terminating the process is our best option.
|
||||
child: JodGroupChild,
|
||||
thread: jod_thread::JoinHandle<io::Result<(bool, String)>>,
|
||||
thread: stdx::thread::JoinHandle<io::Result<(bool, String)>>,
|
||||
receiver: Receiver<CargoMessage>,
|
||||
}
|
||||
|
||||
|
@ -409,7 +409,7 @@ impl CargoHandle {
|
|||
|
||||
let (sender, receiver) = unbounded();
|
||||
let actor = CargoActor::new(sender, stdout, stderr);
|
||||
let thread = jod_thread::Builder::new()
|
||||
let thread = stdx::thread::Builder::new(stdx::thread::QoSClass::Utility)
|
||||
.name("CargoHandle".to_owned())
|
||||
.spawn(move || actor.run())
|
||||
.expect("failed to spawn thread");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue