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

@@ -1,5 +1,6 @@
use {
crate::bank::Bank,
crossbeam_channel::{unbounded, Receiver, Sender},
solana_sdk::{
account::Account,
client::{AsyncClient, Client, SyncClient},
@@ -19,10 +20,7 @@ use {
std::{
convert::TryFrom,
io,
sync::{
mpsc::{channel, Receiver, Sender},
Arc, Mutex,
},
sync::{Arc, Mutex},
thread::{sleep, Builder},
time::{Duration, Instant},
},
@@ -340,7 +338,7 @@ impl BankClient {
}
pub fn new_shared(bank: &Arc<Bank>) -> Self {
let (transaction_sender, transaction_receiver) = channel();
let (transaction_sender, transaction_receiver) = unbounded();
let transaction_sender = Mutex::new(transaction_sender);
let thread_bank = bank.clone();
let bank = bank.clone();

View File

@@ -8,15 +8,13 @@ use {
TMP_BANK_SNAPSHOT_PREFIX,
},
},
crossbeam_channel::{Receiver, SendError, Sender},
log::*,
solana_sdk::{clock::Slot, genesis_config::ClusterType, hash::Hash},
std::{
fs,
path::{Path, PathBuf},
sync::{
mpsc::{Receiver, SendError, Sender},
Arc, Mutex,
},
sync::{Arc, Mutex},
},
tempfile::TempDir,
};