1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 13:52:55 +03:00

add some debug to SpawnQueue::has_any_queued

I'm seeing occasional 100% cpu usage on my linux system and I'm
not sure if its just because I'm running a stale binary.
I added this (commented out in this commit, but live on my local
system) debug print to help understand it.
This commit is contained in:
Wez Furlong 2019-11-22 07:08:22 -08:00
parent 5dfd03468b
commit 95900dc0a5

View File

@ -65,10 +65,13 @@ impl SpawnQueue {
}
fn has_any_queued(&self) -> bool {
if !self.spawned_funcs.lock().unwrap().is_empty() {
let len = self.spawned_funcs.lock().unwrap().len();
let low_len = self.spawned_funcs_low_pri.lock().unwrap().len();
if len + low_len > 0 {
// eprintln!("{} + {} queued spawns", len, low_len);
true
} else {
!self.spawned_funcs_low_pri.lock().unwrap().is_empty()
false
}
}
}