From 5b0a97f3800a91af3a016d193f972212d7deaf03 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Sun, 19 Jun 2022 02:07:43 +1000 Subject: [PATCH] Fix `UIThread` stopping runtime from shutdown Signed-off-by: Jiahao XU --- src/helpers/ui_thread.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/ui_thread.rs b/src/helpers/ui_thread.rs index 0166cb1f..d1ba7fc6 100644 --- a/src/helpers/ui_thread.rs +++ b/src/helpers/ui_thread.rs @@ -1,10 +1,10 @@ use std::io::{self, BufRead, Write}; +use std::thread; use bytes::Bytes; use log::LevelFilter; use std::sync::mpsc as mpsc_sync; use tokio::sync::mpsc; -use tokio::task::spawn_blocking; use super::ui_thread_logger::UIThreadLogger; use crate::BinstallError; @@ -36,7 +36,7 @@ impl UIThreadInner { let (request_tx, request_rx) = mpsc_sync::sync_channel(50); let (confirm_tx, confirm_rx) = mpsc::channel(10); - spawn_blocking(move || { + thread::spawn(move || { // This task should be the only one able to // access stdin let mut stdin = io::stdin().lock();