aboutsummaryrefslogtreecommitdiff
path: root/src/io.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-07-01 10:34:08 -0700
committerJoe Wilm <joe@jwilm.com>2016-07-01 10:34:08 -0700
commitae39d38a151f264b09c8e7a698d3838f8aa18dd8 (patch)
treeb234a6dcc409db9e0dee809f837c0110684db38e /src/io.rs
parentd514b382237d4df2e33503602ec2af4c0cbb2189 (diff)
downloadr-alacritty-ae39d38a151f264b09c8e7a698d3838f8aa18dd8.tar.gz
r-alacritty-ae39d38a151f264b09c8e7a698d3838f8aa18dd8.tar.bz2
r-alacritty-ae39d38a151f264b09c8e7a698d3838f8aa18dd8.zip
Improve pty reading and renderer synchronization
The pty read thread now runs the parser and directly updates the terminal in the same thread. This obviates the need for a channel which sends every char read from the pty; this is a huge performance boon. Synchronization between the updater and the renderer is now achieved with a PriorityMutex. Previously, an atomic bool was (poorly) used to request the lock on terminal. The PriorityMutex is dead simple to use, and it _Just Works_.
Diffstat (limited to 'src/io.rs')
-rw-r--r--src/io.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io.rs b/src/io.rs
index 688e72a4..5801efaf 100644
--- a/src/io.rs
+++ b/src/io.rs
@@ -69,7 +69,7 @@ pub enum Utf8CharsError {
/// of a byte sequence well-formed in UTF-8, but ends prematurely.
///
/// Contains number of unused bytes
- IncompleteUtf8(u8),
+ IncompleteUtf8(usize),
/// Variant representing that an I/O error occurred.
Io(Error),