aboutsummaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-09-23 10:12:11 -0700
committerJoe Wilm <joe@jwilm.com>2016-09-23 10:12:11 -0700
commitbe09467d48a5b7644411c2a09d948ee89509894e (patch)
treeea49bab6e759d617c45ea0c8ed10a6dda918e185 /src/event.rs
parentcbeec3df5a19487a9dfaf3b285ab6722e69fee54 (diff)
downloadalacritty-be09467d48a5b7644411c2a09d948ee89509894e.tar.gz
alacritty-be09467d48a5b7644411c2a09d948ee89509894e.zip
Fix some compiler warnings
Also enables debug symbols in release profile by default. Until Alacritty ships, there's going to be lots of perf analysis which needs debug symbols. The PriorityMutex low priority method was never used. Now it's just a fair mutex.
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/event.rs b/src/event.rs
index bb5eebe0..303c6d8e 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -5,15 +5,14 @@ use std;
use glutin;
use input;
-use sync::PriorityMutex;
+use sync::FairMutex;
use term::Term;
-use tty::process_should_exit;
/// The event processor
pub struct Processor<'a, W: 'a> {
writer: &'a mut W,
input_processor: input::Processor,
- terminal: Arc<PriorityMutex<Term>>,
+ terminal: Arc<FairMutex<Term>>,
resize_tx: mpsc::Sender<(u32, u32)>,
}
@@ -25,7 +24,7 @@ impl<'a, W> Processor<'a, W>
/// Takes a writer which is expected to be hooked up to the write end of a
/// pty.
pub fn new(writer: &mut W,
- terminal: Arc<PriorityMutex<Term>>,
+ terminal: Arc<FairMutex<Term>>,
resize_tx: mpsc::Sender<(u32, u32)>)
-> Processor<W>
{
@@ -55,12 +54,12 @@ impl<'a, W> Processor<'a, W>
glutin::Event::Resized(w, h) => {
self.resize_tx.send((w, h)).expect("send new size");
// Acquire term lock
- let mut terminal = self.terminal.lock_high();
+ let mut terminal = self.terminal.lock();
terminal.dirty = true;
},
glutin::Event::KeyboardInput(state, _code, key, mods) => {
// Acquire term lock
- let terminal = self.terminal.lock_high();
+ let terminal = self.terminal.lock();
self.input_processor.process(state, key, mods,
&mut input::WriteNotifier(self.writer),