async fn poll(
    input_options: InputOptions<'_>,
    receiver: &mut AppReceiver,
    crossterm_rx: &mut mpsc::Receiver<crossterm::event::Event>,
) -> Option<Event> {
    let input_closed = crossterm_rx.is_closed();

    if input_closed {
        receiver.recv().await
    } else {
        // tokio::select is messing with variable read detection
        #[allow(unused_assignments)]
        let mut event = None;
        loop {
            tokio::select! {
                e = crossterm_rx.recv() => {
                    event = e.and_then(|e| input_options.handle_crossterm_event(e));
                }
                e = receiver.recv() => {
                    event = e;
                }
            }
            if event.is_some() {
                break;
            }
        }
        event
    }
}
Blocking poll for events, will only return None if app handle has been
dropped
crates/turborepo-ui/src/tui/app.rs