@@ -88,7 +88,8 @@ impl<'a> RequestDispatcher<'a> {
88
88
self
89
89
}
90
90
91
- /// Dispatches the request onto thread pool
91
+ /// Dispatches a non-latency-sensitive request onto the thread pool
92
+ /// without retrying it if it panics.
92
93
pub ( crate ) fn on_no_retry < R > (
93
94
& mut self ,
94
95
f : fn ( GlobalStateSnapshot , R :: Params ) -> Result < R :: Result > ,
@@ -103,7 +104,7 @@ impl<'a> RequestDispatcher<'a> {
103
104
None => return self ,
104
105
} ;
105
106
106
- self . global_state . task_pool . handle . spawn ( QoSClass :: Default , {
107
+ self . global_state . task_pool . handle . spawn ( QoSClass :: Utility , {
107
108
let world = self . global_state . snapshot ( ) ;
108
109
move || {
109
110
let result = panic:: catch_unwind ( move || {
@@ -124,7 +125,7 @@ impl<'a> RequestDispatcher<'a> {
124
125
self
125
126
}
126
127
127
- /// Dispatches the request onto thread pool
128
+ /// Dispatches a non-latency-sensitive request onto the thread pool.
128
129
pub ( crate ) fn on < R > (
129
130
& mut self ,
130
131
f : fn ( GlobalStateSnapshot , R :: Params ) -> Result < R :: Result > ,
@@ -134,7 +135,7 @@ impl<'a> RequestDispatcher<'a> {
134
135
R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug ,
135
136
R :: Result : Serialize ,
136
137
{
137
- self . on_with_qos :: < R > ( QoSClass :: Default , f)
138
+ self . on_with_qos :: < R > ( QoSClass :: Utility , f)
138
139
}
139
140
140
141
/// Dispatches a latency-sensitive request onto the thread pool.
@@ -147,7 +148,7 @@ impl<'a> RequestDispatcher<'a> {
147
148
R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug ,
148
149
R :: Result : Serialize ,
149
150
{
150
- self . on_with_qos :: < R > ( QoSClass :: Default , f)
151
+ self . on_with_qos :: < R > ( QoSClass :: UserInitiated , f)
151
152
}
152
153
153
154
pub ( crate ) fn finish ( & mut self ) {
0 commit comments