aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/main_loop.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop.rs')
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index 87b4e3ac2..16c05e4c3 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -170,7 +170,9 @@ fn main_loop_inner(
170 170
171 let (libdata_sender, libdata_receiver) = unbounded(); 171 let (libdata_sender, libdata_receiver) = unbounded();
172 loop { 172 loop {
173 let _p = profile("loop_turn");
173 state.maybe_collect_garbage(); 174 state.maybe_collect_garbage();
175
174 log::trace!("selecting"); 176 log::trace!("selecting");
175 let event = select! { 177 let event = select! {
176 recv(msg_receiver) -> msg => match msg { 178 recv(msg_receiver) -> msg => match msg {
@@ -184,8 +186,11 @@ fn main_loop_inner(
184 }, 186 },
185 recv(libdata_receiver) -> data => Event::Lib(data.unwrap()) 187 recv(libdata_receiver) -> data => Event::Lib(data.unwrap())
186 }; 188 };
187 log::info!("loop_turn = {:?}", event); 189 log::info!("loop turn = {:?}", event);
188 let _p = profile("loop_turn"); 190 let queue_count = pool.queued_count();
191 if queue_count > 0 {
192 log::info!("queued count = {}", queue_count);
193 }
189 let mut state_changed = false; 194 let mut state_changed = false;
190 match event { 195 match event {
191 Event::Task(task) => on_task(task, msg_sender, pending_requests), 196 Event::Task(task) => on_task(task, msg_sender, pending_requests),
@@ -468,7 +473,7 @@ impl<'a> PoolDispatcher<'a> {
468 Ok(self) 473 Ok(self)
469 } 474 }
470 475
471 fn finish(&mut self) -> ::std::result::Result<u64, RawRequest> { 476 fn finish(&mut self) -> std::result::Result<u64, RawRequest> {
472 match (self.res.take(), self.req.take()) { 477 match (self.res.take(), self.req.take()) {
473 (Some(res), None) => Ok(res), 478 (Some(res), None) => Ok(res),
474 (None, Some(req)) => Err(req), 479 (None, Some(req)) => Err(req),