convert std::sync::mpsc to crossbeam_channel (#22264)

This commit is contained in:
Jeff Biseda
2022-01-11 02:44:46 -08:00
committed by GitHub
parent 3c44d405c7
commit 8b66625c95
81 changed files with 313 additions and 346 deletions

View File

@@ -17,6 +17,7 @@ chrono = { version = "0.4.11", features = ["serde"] }
clap = { version = "2.33.1" }
console = "0.15.0"
ctrlc = { version = "3.2.1", features = ["termination"] }
crossbeam-channel = "0.5"
dirs-next = "2.0.0"
indicatif = "0.16.2"
lazy_static = "1.4.0"

View File

@@ -6,6 +6,7 @@ use {
},
chrono::{Local, TimeZone},
console::{style, Emoji},
crossbeam_channel::unbounded,
indicatif::{ProgressBar, ProgressStyle},
serde::{Deserialize, Serialize},
solana_client::rpc_client::RpcClient,
@@ -21,7 +22,6 @@ use {
fs::{self, File},
io::{self, BufReader, Read},
path::{Path, PathBuf},
sync::mpsc,
time::{Duration, Instant, SystemTime},
},
tempfile::TempDir,
@@ -1196,7 +1196,7 @@ pub fn run(
let mut child_option: Option<std::process::Child> = None;
let mut now = Instant::now();
let (signal_sender, signal_receiver) = mpsc::channel();
let (signal_sender, signal_receiver) = unbounded();
ctrlc::set_handler(move || {
let _ = signal_sender.send(());
})