@@ -88,7 +88,8 @@ impl<'a> RequestDispatcher<'a> {
8888 self
8989 }
9090
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.
9293 pub ( crate ) fn on_no_retry < R > (
9394 & mut self ,
9495 f : fn ( GlobalStateSnapshot , R :: Params ) -> Result < R :: Result > ,
@@ -103,7 +104,7 @@ impl<'a> RequestDispatcher<'a> {
103104 None => return self ,
104105 } ;
105106
106- self . global_state . task_pool . handle . spawn ( QoSClass :: Default , {
107+ self . global_state . task_pool . handle . spawn ( QoSClass :: Utility , {
107108 let world = self . global_state . snapshot ( ) ;
108109 move || {
109110 let result = panic:: catch_unwind ( move || {
@@ -124,7 +125,7 @@ impl<'a> RequestDispatcher<'a> {
124125 self
125126 }
126127
127- /// Dispatches the request onto thread pool
128+ /// Dispatches a non-latency-sensitive request onto the thread pool.
128129 pub ( crate ) fn on < R > (
129130 & mut self ,
130131 f : fn ( GlobalStateSnapshot , R :: Params ) -> Result < R :: Result > ,
@@ -134,7 +135,7 @@ impl<'a> RequestDispatcher<'a> {
134135 R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug ,
135136 R :: Result : Serialize ,
136137 {
137- self . on_with_qos :: < R > ( QoSClass :: Default , f)
138+ self . on_with_qos :: < R > ( QoSClass :: Utility , f)
138139 }
139140
140141 /// Dispatches a latency-sensitive request onto the thread pool.
@@ -147,7 +148,7 @@ impl<'a> RequestDispatcher<'a> {
147148 R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug ,
148149 R :: Result : Serialize ,
149150 {
150- self . on_with_qos :: < R > ( QoSClass :: Default , f)
151+ self . on_with_qos :: < R > ( QoSClass :: UserInitiated , f)
151152 }
152153
153154 pub ( crate ) fn finish ( & mut self ) {
0 commit comments