docs: explain backpressure rationale for PTY event channel in
This commit is contained in:
parent
f16dc74a7a
commit
ac436abac6
2 changed files with 8 additions and 1 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue