mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +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
|
@ -80,7 +80,11 @@ pub(crate) fn parallel_prime_caches(
|
|||
for _ in 0..num_worker_threads {
|
||||
let worker = prime_caches_worker.clone();
|
||||
let db = db.snapshot();
|
||||
std::thread::spawn(move || Cancelled::catch(|| worker(db)));
|
||||
|
||||
stdx::thread::Builder::new(stdx::thread::QoSClass::Utility)
|
||||
.allow_leak(true)
|
||||
.spawn(move || Cancelled::catch(|| worker(db)))
|
||||
.expect("failed to spawn thread");
|
||||
}
|
||||
|
||||
(work_sender, progress_receiver)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue