diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-29 21:38:22 -0500 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-29 21:38:22 -0500 |
commit | a91a3f2dce121a179a9371cd0ad1e548cf3d7731 (patch) | |
tree | 311f1ee1b60eb9fb11bad3bdee8812d3be5590b8 /src/display.rs | |
parent | b704dafb2420df6f7fca64980a2f52c1a00bcef5 (diff) | |
download | alacritty-a91a3f2dce121a179a9371cd0ad1e548cf3d7731.tar.gz alacritty-a91a3f2dce121a179a9371cd0ad1e548cf3d7731.zip |
Fix pty read sometimes not triggering draw
There was a lot of complexity around the threadsafe `Flag` type and
waking up the event loop. The idea was to prevent unnecessary calls to
the glutin window's wakeup_event_loop() method which can be expensive.
This complexity made it difficult to get synchronization between the pty
reader and the render thread correct. Now, the `dirty` flag on the
terminal is also used to prevent spurious wakeups. It is only changed
when the mutex is held, so race conditions associated with that flag
shouldn't happen.
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/display.rs b/src/display.rs index e12d1c8f..8cf19f47 100644 --- a/src/display.rs +++ b/src/display.rs @@ -213,12 +213,6 @@ impl Display { /// /// This call may block if vsync is enabled pub fn draw(&mut self, mut terminal: MutexGuard<Term>, config: &Config, selection: &Selection) { - // This is a hack since sometimes we get stuck waiting for events - // in the main loop otherwise. - // - // TODO figure out why this is necessary - self.window.clear_wakeup_flag(); - // Clear dirty flag terminal.dirty = false; |