Revert "bound the event channel to prevent unbounded RSS growth"

This commit is contained in:
Michael Murphy 2026-05-18 16:30:51 +02:00 committed by GitHub
parent cf059265f8
commit 3bd221e3e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 14 deletions

View file

@ -99,16 +99,13 @@ impl From<Size> for WindowSize {
pub struct EventProxy(
pane_grid::Pane,
segmented_button::Entity,
mpsc::Sender<(pane_grid::Pane, segmented_button::Entity, Event)>,
mpsc::UnboundedSender<(pane_grid::Pane, segmented_button::Entity, Event)>,
);
impl EventListener for EventProxy {
fn send_event(&self, event: Event) {
// Bounded channel; blocking_send propagates backpressure to alacritty's
// PTY reader instead of letting events accumulate. Called from alacritty's
// std::thread PTY reader (not a tokio worker), so blocking is safe and
// blocking_send won't panic.
let _ = self.2.blocking_send((self.0, self.1, event));
//TODO: handle error
let _ = self.2.send((self.0, self.1, event));
}
}
@ -273,7 +270,7 @@ impl Terminal {
pub fn new(
pane: pane_grid::Pane,
entity: segmented_button::Entity,
event_tx: mpsc::Sender<(pane_grid::Pane, segmented_button::Entity, Event)>,
event_tx: mpsc::UnboundedSender<(pane_grid::Pane, segmented_button::Entity, Event)>,
config: Config,
options: Options,
app_config: &AppConfig,