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

@@ -15,6 +15,7 @@ chrono = { version = "0.4.11", features = ["serde"] }
clap = "2.33.1"
console = "0.15.0"
core_affinity = "0.5.10"
crossbeam-channel = "0.5"
fd-lock = "3.0.2"
indicatif = "0.16.2"
jsonrpc-core = "18.0.0"

View File

@@ -1,5 +1,6 @@
use {
clap::{crate_name, value_t, value_t_or_exit, values_t_or_exit, App, Arg},
crossbeam_channel::unbounded,
log::*,
solana_clap_utils::{
input_parsers::{pubkey_of, pubkeys_of, value_of},
@@ -35,7 +36,7 @@ use {
net::{IpAddr, Ipv4Addr, SocketAddr},
path::{Path, PathBuf},
process::exit,
sync::{mpsc::channel, Arc, RwLock},
sync::{Arc, RwLock},
time::{Duration, SystemTime, UNIX_EPOCH},
},
};
@@ -524,7 +525,7 @@ fn main() {
let faucet_pubkey = faucet_keypair.pubkey();
if let Some(faucet_addr) = &faucet_addr {
let (sender, receiver) = channel();
let (sender, receiver) = unbounded();
run_local_faucet_with_port(faucet_keypair, sender, None, faucet_addr.port());
let _ = receiver.recv().expect("run faucet").unwrap_or_else(|err| {
println!("Error: failed to start faucet: {}", err);