mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 06:12:16 +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:
parent
5dfd03468b
commit
95900dc0a5
@ -65,10 +65,13 @@ impl SpawnQueue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn has_any_queued(&self) -> bool {
|
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
|
true
|
||||||
} else {
|
} else {
|
||||||
!self.spawned_funcs_low_pri.lock().unwrap().is_empty()
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user