mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
Fix UIThread
stopping runtime from shutdown
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
d4eb56d017
commit
5b0a97f380
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue