From ae39d38a151f264b09c8e7a698d3838f8aa18dd8 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Fri, 1 Jul 2016 10:34:08 -0700 Subject: 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_. --- src/io.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/io.rs') 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), -- cgit