docs: explain backpressure rationale for PTY event channel in

This commit is contained in:
Marshall Humble 2026-05-14 17:29:31 -05:00
parent f16dc74a7a
commit ac436abac6
2 changed files with 8 additions and 1 deletions

View file

@ -104,7 +104,10 @@ pub struct EventProxy(
impl EventListener for EventProxy {
fn send_event(&self, event: Event) {
//TODO: handle error
// 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));
}
}