@@ -4,7 +4,7 @@ use std::{fmt, panic, thread};
4
4
use ide:: Cancelled ;
5
5
use lsp_server:: ExtractError ;
6
6
use serde:: { de:: DeserializeOwned , Serialize } ;
7
- use stdx:: thread:: QoSClass ;
7
+ use stdx:: thread:: ThreadIntent ;
8
8
9
9
use crate :: {
10
10
global_state:: { GlobalState , GlobalStateSnapshot } ,
@@ -104,7 +104,7 @@ impl<'a> RequestDispatcher<'a> {
104
104
None => return self ,
105
105
} ;
106
106
107
- self . global_state . task_pool . handle . spawn ( QoSClass :: Utility , {
107
+ self . global_state . task_pool . handle . spawn ( ThreadIntent :: Worker , {
108
108
let world = self . global_state . snapshot ( ) ;
109
109
move || {
110
110
let result = panic:: catch_unwind ( move || {
@@ -135,7 +135,7 @@ impl<'a> RequestDispatcher<'a> {
135
135
R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug ,
136
136
R :: Result : Serialize ,
137
137
{
138
- self . on_with_qos :: < R > ( QoSClass :: Utility , f)
138
+ self . on_with_thread_intent :: < R > ( ThreadIntent :: Worker , f)
139
139
}
140
140
141
141
/// Dispatches a latency-sensitive request onto the thread pool.
@@ -148,7 +148,7 @@ impl<'a> RequestDispatcher<'a> {
148
148
R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug ,
149
149
R :: Result : Serialize ,
150
150
{
151
- self . on_with_qos :: < R > ( QoSClass :: UserInitiated , f)
151
+ self . on_with_thread_intent :: < R > ( ThreadIntent :: LatencySensitive , f)
152
152
}
153
153
154
154
pub ( crate ) fn finish ( & mut self ) {
@@ -163,9 +163,9 @@ impl<'a> RequestDispatcher<'a> {
163
163
}
164
164
}
165
165
166
- fn on_with_qos < R > (
166
+ fn on_with_thread_intent < R > (
167
167
& mut self ,
168
- qos_class : QoSClass ,
168
+ intent : ThreadIntent ,
169
169
f : fn ( GlobalStateSnapshot , R :: Params ) -> Result < R :: Result > ,
170
170
) -> & mut Self
171
171
where
@@ -178,7 +178,7 @@ impl<'a> RequestDispatcher<'a> {
178
178
None => return self ,
179
179
} ;
180
180
181
- self . global_state . task_pool . handle . spawn ( qos_class , {
181
+ self . global_state . task_pool . handle . spawn ( intent , {
182
182
let world = self . global_state . snapshot ( ) ;
183
183
move || {
184
184
let result = panic:: catch_unwind ( move || {
0 commit comments