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

@ -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)