@@ -4,7 +4,7 @@ use std::{fmt, panic, thread};
44use ide:: Cancelled ;
55use lsp_server:: ExtractError ;
66use serde:: { de:: DeserializeOwned , Serialize } ;
7- use stdx:: thread:: QoSClass ;
7+ use stdx:: thread:: ThreadIntent ;
88
99use crate :: {
1010 global_state:: { GlobalState , GlobalStateSnapshot } ,
@@ -104,7 +104,7 @@ impl<'a> RequestDispatcher<'a> {
104104 None => return self ,
105105 } ;
106106
107- self . global_state . task_pool . handle . spawn ( QoSClass :: Utility , {
107+ self . global_state . task_pool . handle . spawn ( ThreadIntent :: Worker , {
108108 let world = self . global_state . snapshot ( ) ;
109109 move || {
110110 let result = panic:: catch_unwind ( move || {
@@ -135,7 +135,7 @@ impl<'a> RequestDispatcher<'a> {
135135 R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug ,
136136 R :: Result : Serialize ,
137137 {
138- self . on_with_qos :: < R > ( QoSClass :: Utility , f)
138+ self . on_with_thread_intent :: < R > ( ThreadIntent :: Worker , f)
139139 }
140140
141141 /// Dispatches a latency-sensitive request onto the thread pool.
@@ -148,7 +148,7 @@ impl<'a> RequestDispatcher<'a> {
148148 R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug ,
149149 R :: Result : Serialize ,
150150 {
151- self . on_with_qos :: < R > ( QoSClass :: UserInitiated , f)
151+ self . on_with_thread_intent :: < R > ( ThreadIntent :: LatencySensitive , f)
152152 }
153153
154154 pub ( crate ) fn finish ( & mut self ) {
@@ -163,9 +163,9 @@ impl<'a> RequestDispatcher<'a> {
163163 }
164164 }
165165
166- fn on_with_qos < R > (
166+ fn on_with_thread_intent < R > (
167167 & mut self ,
168- qos_class : QoSClass ,
168+ intent : ThreadIntent ,
169169 f : fn ( GlobalStateSnapshot , R :: Params ) -> Result < R :: Result > ,
170170 ) -> & mut Self
171171 where
@@ -178,7 +178,7 @@ impl<'a> RequestDispatcher<'a> {
178178 None => return self ,
179179 } ;
180180
181- self . global_state . task_pool . handle . spawn ( qos_class , {
181+ self . global_state . task_pool . handle . spawn ( intent , {
182182 let world = self . global_state . snapshot ( ) ;
183183 move || {
184184 let result = panic:: catch_unwind ( move || {
0 commit comments