hotpath 0.15.0

Simple async Rust profiler with memory and data-flow insights - quickly find and debug performance bottlenecks.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::cmd::run::events::AppEvent;
use crossbeam_channel::Sender;
use crossterm::event::{self, Event, KeyEventKind};

pub fn spawn_input_reader(tx: Sender<AppEvent>) {
    std::thread::spawn(move || loop {
        if let Ok(Event::Key(key)) = event::read() {
            if key.kind == KeyEventKind::Press && tx.send(AppEvent::Key(key.code)).is_err() {
                break;
            }
        }
    });
}