clean up process death detection on windows w/ new frontend

This commit is contained in:
Wez Furlong committed 2019-10-25 08:26:38 -07:00
1 parent fc918c2f4d
commit 3ca3b3196e
2 files changed
+27 -2

No files matched your search

+12 -2
View File
@@ -230,8 +230,19 @@ impl Mux {
}
}
let dead_tab_ids: Vec<TabId> = self
.tabs
.borrow()
.iter()
.filter_map(|(&id, tab)| if tab.is_dead() { Some(id) } else { None })
.collect();
for tab_id in dead_tab_ids {
self.tabs.borrow_mut().remove(&tab_id);
}
for window_id in dead_windows {
debug!("removing window {}", window_id);
error!("removing window {}", window_id);
windows.remove(&window_id);
}
}
@@ -274,7 +285,6 @@ impl Mux {
Ok(())
}
#[allow(dead_code)]
pub fn is_empty(&self) -> bool {
self.tabs.borrow().is_empty()
}
+15
View File
@@ -89,6 +89,21 @@ impl Window {
}
pub fn prune_dead_tabs(&mut self, live_tab_ids: &[TabId]) {
let dead: Vec<TabId> = self
.tabs
.iter()
.filter_map(|tab| {
if tab.is_dead() {
Some(tab.tab_id())
} else {
None
}
})
.collect();
for tab_id in dead {
self.remove_by_id(tab_id);
}
let dead: Vec<TabId> = self
.tabs
.iter()