mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 22:01:47 +03:00
b83a63126c
The `SpawnQueue::run_impl` would loop until it had exhausted all queued items. This prevents returning to the main loop and resulted in the UI hanging while eg: `yes` was running, and could also block accepting keyboard input, which is pretty bad. In addition, the queue implementation could fill up a pipe and block the write side while it held a lock, which in turn would prevent the read side from making room for the write to succeed! This commit changes the behavior on linux to change the wakeup behavior of the queue from having a 1:1 relationship between enqueue:wakeup to n:m where n and m are both >= 1. This is sufficient to wake a sleeping gui thread. The gui thread can then pop and process a single item at a time, interleaved with dispatching the gui events. The result is a bit more responsive, however, there is no backpressure from the gui to the read side, so if the read side is eating 2MB/s of data and the GUI side is processing less than this, then an interrupt signal may still take a few seconds to take effect. I have mixed feelings about adding backpressure, because I'm not sure that it is worth actually rendering all of the parsed output text when there is a lot of it. I need to follow up and verify these changes on macOS and Windows too. Refs: https://github.com/wez/wezterm/issues/65 |
||
---|---|---|
.. | ||
examples | ||
src | ||
build.rs | ||
Cargo.toml |